* After completing an SMTP queue run, include the number of messages processed in...
authorArt Cancro <ajc@citadel.org>
Thu, 19 Mar 2009 14:22:27 +0000 (14:22 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 19 Mar 2009 14:22:27 +0000 (14:22 +0000)
citadel/modules/smtp/serv_smtp.c

index 5d520ae2bf5489603cf37fff3e153af3d77aee51..a5d64f0a5e22463150deee7536fdadb6acb87315 100644 (file)
@@ -1696,6 +1696,7 @@ void smtp_do_procmsg(long msgnum, void *userdata) {
  */
 void smtp_do_queue(void) {
        static int doing_queue = 0;
+       int num_processed = 0;
 
        /*
         * This is a simple concurrency check to make sure only one queue run
@@ -1715,10 +1716,9 @@ void smtp_do_queue(void) {
                CtdlLogPrintf(CTDL_ERR, "Cannot find room <%s>\n", SMTP_SPOOLOUT_ROOM);
                return;
        }
-       CtdlForEachMessage(MSGS_ALL, 0L, NULL,
-               SPOOLMIME, NULL, smtp_do_procmsg, NULL);
+       num_processed = CtdlForEachMessage(MSGS_ALL, 0L, NULL, SPOOLMIME, NULL, smtp_do_procmsg, NULL);
 
-       CtdlLogPrintf(CTDL_INFO, "SMTP client: queue run completed\n");
+       CtdlLogPrintf(CTDL_INFO, "SMTP client: queue run completed; %d messages processed\n", num_processed);
        run_queue_now = 0;
        doing_queue = 0;
 }