]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/smtp/serv_smtpqueue.c
SMTP-Client: Remove concurrency check; its done in do_housekeeping()
[citadel.git] / citadel / modules / smtp / serv_smtpqueue.c
index c0af5c0f57f36f32829c8e06b716f5801eeabd0c..b874d1268452870449d405922989cb31d4a4f1b8 100644 (file)
@@ -397,7 +397,8 @@ void NewMailQEntry(OneQueItem *Item)
 
        if (Item->MailQEntries == NULL)
                Item->MailQEntries = NewHash(1, Flathash);
-       Item->Current->StatusMessage = NewStrBuf();
+       /* alocate big buffer so we won't get problems reallocating later. */
+       Item->Current->StatusMessage = NewStrBufPlain(NULL, SIZ);
        Item->Current->n = GetCount(Item->MailQEntries);
        Put(Item->MailQEntries,
            IKEY(Item->Current->n),
@@ -1002,14 +1003,9 @@ void smtp_do_procmsg(long msgnum, void *userdata) {
  * Run through the queue sending out messages.
  */
 void smtp_do_queue(void) {
-       static int is_running = 0;
        int num_processed = 0;
        int num_activated = 0;
 
-       if (is_running)
-               return; /* Concurrency check - only one can run */
-       is_running = 1;
-
        pthread_setspecific(MyConKey, (void *)&smtp_queue_CC);
        SMTPCM_syslog(LOG_INFO, "processing outbound queue");
 
@@ -1029,8 +1025,6 @@ void smtp_do_queue(void) {
                     "queue run completed; %d messages processed %d activated",
                     num_processed, num_activated);
 
-       run_queue_now = 0;
-       is_running = 0;
 }