SMTP-Client: Fix handling of retry-time.
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 29 Jan 2012 16:43:29 +0000 (17:43 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 29 Jan 2012 16:43:29 +0000 (17:43 +0100)
citadel/modules/smtp/serv_smtpqueue.c

index 72b73bf1a27580410c0739ebcdc3a3d2cde3b8e0..f56ad9a9a24e74185b181c9b444ce550f686cb84 100644 (file)
@@ -661,7 +661,8 @@ void smtp_do_procmsg(long msgnum, void *userdata) {
        /*
         * Postpone delivery if we've already tried recently.
         */
-       if (((time(NULL) - MyQItem->ReattemptWhen) > 0) &&
+       if ((MyQItem->ReattemptWhen != 0) && 
+           (time(NULL) < MyQItem->ReattemptWhen) &&
            (run_queue_now == 0))
        {
                syslog(LOG_DEBUG, "SMTP client: Retry time not yet reached.\n");