Don't bother sending UID APPEND if the caller doesn't care about
authorJeffrey Stedfast <fejj@novell.com>
Mon, 13 Dec 2004 18:43:20 +0000 (18:43 +0000)
committerJeffrey Stedfast <fejj@src.gnome.org>
Mon, 13 Dec 2004 18:43:20 +0000 (18:43 +0000)
2004-12-09  Jeffrey Stedfast  <fejj@novell.com>

* providers/imap4/camel-imap4-folder.c (imap4_append_message):
Don't bother sending UID APPEND if the caller doesn't care about
appended_uid.

camel/ChangeLog
camel/providers/imap4/camel-imap4-folder.c

index f15c4fb..2fc0e6a 100644 (file)
@@ -1,3 +1,9 @@
+2004-12-09  Jeffrey Stedfast  <fejj@novell.com>
+
+       * providers/imap4/camel-imap4-folder.c (imap4_append_message):
+       Don't bother sending UID APPEND if the caller doesn't care about
+       appended_uid.
+
 2004-12-13  Not Zed  <NotZed@Ximian.com>
 
        * tests/lib/Makefile.am: put the test-provider stuff back in.
index 1aa5fef..48524ac 100644 (file)
@@ -928,7 +928,7 @@ imap4_append_message (CamelFolder *folder, CamelMimeMessage *message,
        
  retry:
        
-       if (engine->capa & CAMEL_IMAP4_CAPABILITY_UIDPLUS)
+       if (appended_uid && engine->capa & CAMEL_IMAP4_CAPABILITY_UIDPLUS)
                ic = camel_imap4_engine_queue (engine, NULL, "UID APPEND %F%s%s %L\r\n", folder, flags, date, message);
        else
                ic = camel_imap4_engine_queue (engine, NULL, "APPEND %F%s%s %L\r\n", folder, flags, date, message);
@@ -945,10 +945,7 @@ imap4_append_message (CamelFolder *folder, CamelMimeMessage *message,
        
        switch (ic->result) {
        case CAMEL_IMAP4_RESULT_OK:
-               if (!(engine->capa & CAMEL_IMAP4_CAPABILITY_UIDPLUS))
-                       break;
-               
-               if (!appended_uid)
+               if (!appended_uid || !(engine->capa & CAMEL_IMAP4_CAPABILITY_UIDPLUS))
                        break;
                
                for (i = 0; i < ic->resp_codes->len; i++) {