From: Peter Pentchev Date: Sat, 19 Jun 2010 11:09:45 +0000 (+0000) Subject: Force delivery on a SIGALRM. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8213f457cf9f9c013f95d2e7b6413fbb60bd0cc;p=people%2Fms%2Fdma.git Force delivery on a SIGALRM. --- diff --git a/changelog b/changelog index d15cb0d..31895d5 100644 --- a/changelog +++ b/changelog @@ -44,6 +44,7 @@ dma (0.0.2010.06.17-1) UNRELEASED; urgency=low spool files to the new queue format (M* and Q* files for each message) * Add a dma-migrate invocation to dma.cron.d * Shorten the Vcs-Browser URL. + * Add the 31-sigalrm-backoff patch to force a delivery attempt on SIGALRM. -- Peter Pentchev Wed, 02 Jun 2010 14:10:05 +0300 diff --git a/patches/31-sigalrm-backoff.patch b/patches/31-sigalrm-backoff.patch new file mode 100644 index 0000000..1a938a2 --- /dev/null +++ b/patches/31-sigalrm-backoff.patch @@ -0,0 +1,35 @@ +Description: Allow a SIGALRM to force a delivery attempt. + I'll forward this patch as soon as I catch up with the dma upstream. +Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/ +Forwarded: no +Author: Peter Pentchev +Last-Update: 2010-06-19 + +--- a/dma.c ++++ b/dma.c +@@ -267,6 +267,12 @@ + } + + static void ++sig_alarm(int signo) ++{ ++ (void)signo; /* so that gcc doesn't complain */ ++} ++ ++static void + deliver(struct qitem *it) + { + int error; +@@ -301,7 +307,12 @@ + MAX_TIMEOUT); + goto bounce; + } ++ if (signal(SIGALRM, sig_alarm) == SIG_ERR) ++ syslog(LOG_WARNING, ++ "Could not set an alarm handler, the backoff " ++ "delay cannot be interrupted"); + sleep(backoff); ++ signal(SIGALRM, SIG_DFL); + backoff *= 2; + if (backoff > MAX_RETRY) + backoff = MAX_RETRY; diff --git a/patches/series b/patches/series index ed3011c..b7e12de 100644 --- a/patches/series +++ b/patches/series @@ -13,3 +13,4 @@ 28-valid-recipient.patch 29-double-free.patch 30-ldflags.patch +31-sigalrm-backoff.patch