[evolution-kolab: 6/8] CamelIMAPXExtdServer: fixed CamelIMAPX{Command, Job} handling



commit bbd8deb1db04f4dde3adace120adddd48c31d8ff
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Mon Mar 26 17:09:43 2012 +0200

    CamelIMAPXExtdServer: fixed CamelIMAPX{Command,Job} handling
    
    * the fixes for upstream IMAPX bug #672717 introduced
      some minor API changes inside IMAPX (CamelIMAPXCommand,
      CamelIMAPXJob)
    * updated the extended server accordingly

 .../providers/imapx/camel-imapx-extd-server.c      |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/camel/providers/imapx/camel-imapx-extd-server.c b/src/camel/providers/imapx/camel-imapx-extd-server.c
index 41bde5a..8fed359 100644
--- a/src/camel/providers/imapx/camel-imapx-extd-server.c
+++ b/src/camel/providers/imapx/camel-imapx-extd-server.c
@@ -1767,6 +1767,7 @@ imapx_extd_server_get_metadata (CamelIMAPXExtdServer *self,
 	CamelIMAPXExtdServerPrivate *priv = NULL;
 	CamelIMAPXServer *is = NULL;
 	CamelIMAPXCommand *ic = NULL;
+	CamelIMAPXJob *job = NULL;
 	CamelImapxMetadata *md = NULL;
 	gchar *cmd = NULL;
 	GError *tmp_err = NULL;
@@ -1792,7 +1793,8 @@ imapx_extd_server_get_metadata (CamelIMAPXExtdServer *self,
 	                              "GETANNOTATION",
 	                              NULL,
 	                              cmd);
-	ic->job = camel_imapx_job_new (cancellable);
+	job = camel_imapx_job_new (cancellable);
+	camel_imapx_command_set_job (ic, job);
 	/* TODO set more job details like priority? */
 
 	/* run GETANNOTATION command synchronously
@@ -1801,8 +1803,6 @@ imapx_extd_server_get_metadata (CamelIMAPXExtdServer *self,
 	ok = camel_imapx_server_command_run_sync (is, ic, cancellable, &tmp_err);
 
 	g_free (cmd);
-	camel_imapx_job_unref (ic->job);
-	ic->job = NULL;
 	camel_imapx_command_done (ic);
 	camel_imapx_command_unref (ic);
 
@@ -1829,6 +1829,7 @@ imapx_extd_server_set_metadata (CamelIMAPXExtdServer *self,
 {
 	CamelIMAPXServer *is = NULL;
 	CamelIMAPXCommand *ic = NULL;
+	CamelIMAPXJob *job = NULL;
 	GSList *commands = NULL;
 	GSList *cur_cmd = NULL;
 	GError *tmp_err = NULL;
@@ -1855,7 +1856,8 @@ imapx_extd_server_set_metadata (CamelIMAPXExtdServer *self,
 		                              "SETANNOTATION",
 		                              NULL,
 		                              (gchar *) cur_cmd->data);
-		ic->job = camel_imapx_job_new (cancellable);
+		job = camel_imapx_job_new (cancellable);
+		camel_imapx_command_set_job (ic, job);
 		/* TODO set more job details like priority? */
 
 		/* run SETANNOTATION command synchronously
@@ -1863,8 +1865,6 @@ imapx_extd_server_set_metadata (CamelIMAPXExtdServer *self,
 		 */
 		ok = camel_imapx_server_command_run_sync (is, ic, cancellable, &tmp_err);
 
-		camel_imapx_job_unref (ic->job);
-		ic->job = NULL;
 		camel_imapx_command_done (ic);
 		camel_imapx_command_unref (ic);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]