Bug 621740 - Fix double command ->complete() in imapx_command_start_next()
authorDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 16 Jun 2010 23:06:54 +0000 (00:06 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 16 Jun 2010 23:17:37 +0000 (00:17 +0100)
If imapx_command_start() returns FALSE, it'll already have called the
completion function for the command in question. Don't do it again; it's the
second of the _three_ places that command was getting freed.

camel/providers/imapx/camel-imapx-server.c

index 39dac36..881ddf9 100644 (file)
@@ -893,11 +893,7 @@ imapx_command_start_next(CamelIMAPXServer *is, CamelException *ex)
                                c(printf("* queueing job %3d '%s'\n", (gint)ic->pri, ic->name));
                                pri = ic->pri;
                                camel_dlist_remove((CamelDListNode *)ic);
-                               if (!imapx_command_start(is, ic)) {
-                                       QUEUE_UNLOCK (is);
-                                       ic->complete (is, ic);
-                                       QUEUE_LOCK (is);
-                               }
+                               imapx_command_start(is, ic);
                                count++;
                        }
                        ic = nc;