sync with sylpheed 0.6.0cvs4
authorPaul Mangan <paul@claws-mail.org>
Sun, 2 Sep 2001 15:39:30 +0000 (15:39 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sun, 2 Sep 2001 15:39:30 +0000 (15:39 +0000)
src/procmsg.c

index 7f2b29fe4d92412237da0bb338e2e9bb8529320f..5fd293e828f9ab255666f34c154ed397f4f8bea8 100644 (file)
@@ -653,6 +653,7 @@ gint procmsg_send_queue(void)
 {
        FolderItem *queue;
        gint i;
+       gint ret = 0;
 
        queue = folder_get_default_queue();
        g_return_val_if_fail(queue != NULL, -1);
@@ -666,16 +667,15 @@ gint procmsg_send_queue(void)
                file = folder_item_fetch_msg(queue, i);
                if (file) {
                        if (send_message_queue(file) < 0) {
-                               g_warning(_("Sending queued message failed.\n"));
-                               g_free(file);
-                               return -1;
-                       }
-                       folder_item_remove_msg(queue, i);
+                               g_warning(_("Sending queued message %d failed.\n"), i);
+                               ret = -1;
+                       } else
+                               folder_item_remove_msg(queue, i);
                        g_free(file);
                }
        }
 
-       return 0;
+       return ret;
 }
 
 void procmsg_print_message(MsgInfo *msginfo, const gchar *cmdline)