[evolution-kolab/ek-wip-porting] CamelIMAPXExtdServer: cleansed annotation getting/setting functions
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-porting] CamelIMAPXExtdServer: cleansed annotation getting/setting functions
- Date: Fri, 20 Jul 2012 12:56:18 +0000 (UTC)
commit 6a7ce1ab30b55eaeaffbdefd37ca9dc4e3a6a31d
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Fri Jul 20 14:54:15 2012 +0200
CamelIMAPXExtdServer: cleansed annotation getting/setting functions
* when calling camel_imapx_server_command_run(), there does
not need to be a CamelIMAPXJob involved (since the command
is run synchronously)
* we also do not need to wait for command completion
src/libekolab/camel-imapx-extd-server.c | 20 ++------------------
1 files changed, 2 insertions(+), 18 deletions(-)
---
diff --git a/src/libekolab/camel-imapx-extd-server.c b/src/libekolab/camel-imapx-extd-server.c
index 7f40345..cae8859 100644
--- a/src/libekolab/camel-imapx-extd-server.c
+++ b/src/libekolab/camel-imapx-extd-server.c
@@ -133,7 +133,6 @@ camel_imapx_extd_server_get_metadata (CamelIMAPXServer *is,
GError **err)
{
CamelIMAPXCommand *ic = NULL;
- CamelIMAPXJob *job = NULL;
gchar *cmd = NULL;
GError *tmp_err = NULL;
gboolean ok = FALSE;
@@ -152,13 +151,11 @@ camel_imapx_extd_server_get_metadata (CamelIMAPXServer *is,
spec->mailbox_name,
spec->entry_name,
spec->attrib_name);
+
ic = camel_imapx_command_new (is,
IMAPX_IMAP_TOKEN_GETANNOTATION,
NULL,
cmd);
- job = camel_imapx_job_new (cancellable);
- camel_imapx_command_set_job (ic, job);
- /* TODO set more job details like priority? */
/* run GETANNOTATION command */
ok = camel_imapx_server_command_run (is,
@@ -166,16 +163,6 @@ camel_imapx_extd_server_get_metadata (CamelIMAPXServer *is,
cancellable,
&tmp_err);
g_free (cmd);
-
- /* wait for the command to complete
- * (will improve our chances that the server will
- * already have sent an untagged response when we
- * want to read the metadata information)
- */
- if (ok)
- camel_imapx_command_wait (ic);
-
- camel_imapx_command_done (ic);
camel_imapx_command_unref (ic);
if (! ok) {
@@ -193,7 +180,6 @@ camel_imapx_extd_server_set_metadata (CamelIMAPXServer *is,
GError **err)
{
CamelIMAPXCommand *ic = NULL;
- CamelIMAPXJob *job = NULL;
GSList *commands = NULL;
GSList *cur_cmd = NULL;
GError *tmp_err = NULL;
@@ -219,8 +205,7 @@ camel_imapx_extd_server_set_metadata (CamelIMAPXServer *is,
IMAPX_IMAP_TOKEN_SETANNOTATION,
NULL,
(gchar *) cur_cmd->data);
- job = camel_imapx_job_new (cancellable);
- camel_imapx_command_set_job (ic, job);
+
/* TODO set more job details like priority? */
/* run SETANNOTATION command */
@@ -229,7 +214,6 @@ camel_imapx_extd_server_set_metadata (CamelIMAPXServer *is,
cancellable,
&tmp_err);
- camel_imapx_command_done (ic);
camel_imapx_command_unref (ic);
if (! ok) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]