]> git.ipfire.org Git - people/ms/dma.git/commitdiff
drop 35-delivery-retry.patch: better version aready committed
authorSimon Schubert <2@0x2c.org>
Thu, 28 Oct 2010 21:51:45 +0000 (23:51 +0200)
committerSimon Schubert <2@0x2c.org>
Thu, 28 Oct 2010 21:51:45 +0000 (23:51 +0200)
debian/patches/35-delivery-retry.patch [deleted file]

diff --git a/debian/patches/35-delivery-retry.patch b/debian/patches/35-delivery-retry.patch
deleted file mode 100644 (file)
index 1fbb459..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-Description: Randomize the retry timeouts a bit.
-Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
-Forwarded: http://bugs.launchpad.net/dma/+bug/599542
-Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-28
-
---- a/dma.c
-+++ b/dma.c
-@@ -276,7 +276,7 @@
- deliver(struct qitem *it)
- {
-       int error;
--      unsigned int backoff = MIN_RETRY;
-+      unsigned int backoff = it->remote? MIN_RETRY: MIN_RETRY_LOCAL;
-       const char *errmsg = "unknown bounce reason";
-       struct timeval now;
-       struct stat st;
-@@ -313,7 +313,13 @@
-                               "delay cannot be interrupted");
-               sleep(backoff);
-               signal(SIGALRM, SIG_DFL);
--              backoff *= 2;
-+              backoff = backoff * 2 + (
-+#ifdef HAVE_RANDOM
-+                      random()
-+#else
-+                      rand()
-+#endif
-+                      % RETRY_JITTER);
-               if (backoff > MAX_RETRY)
-                       backoff = MAX_RETRY;
-               goto retry;
---- a/dma.h
-+++ b/dma.h
-@@ -48,7 +48,9 @@
- #define BUF_SIZE      2048
- #define MIN_RETRY     300             /* 5 minutes */
-+#define MIN_RETRY_LOCAL       30              /* 30 seconds */
- #define MAX_RETRY     (3*60*60)       /* retry at least every 3 hours */
-+#define RETRY_JITTER  10
- #define MAX_TIMEOUT   (5*24*60*60)    /* give up after 5 days */
- #ifndef PATH_MAX
- #define PATH_MAX      1024            /* Max path len */