diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2006-11-13 11:56:41 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2006-11-13 11:56:41 +0000 |
commit | 3cc66b4537846d0f9211fcb63c426be9a553edb1 (patch) | |
tree | 7ffb35d99287383146e5a3388d0bc3044565c447 | |
parent | af5614178a73fc5060e4c15064cc5855681fa02d (diff) |
Error if -q is given more than once.
-rw-r--r-- | doc/doc-txt/ChangeLog | 4 | ||||
-rw-r--r-- | src/src/exim.c | 15 |
2 files changed, 15 insertions, 4 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index ee90691a0..ee5817026 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.430 2006/11/13 11:26:37 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.431 2006/11/13 11:56:41 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -264,6 +264,8 @@ PH/40 Import PCRE release 6.7 (fixes some bugs). PH/41 Add bitwise logical operations to eval (courtesy Brad Jorsch). +PH/42 Give an error if -q is specified more than once. + Exim version 4.63 ----------------- diff --git a/src/src/exim.c b/src/src/exim.c index 0b764e99a..6f53c1ffb 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/exim.c,v 1.48 2006/11/07 11:07:43 ph10 Exp $ */ +/* $Cambridge: exim/src/src/exim.c,v 1.49 2006/11/13 11:56:41 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -2646,6 +2646,11 @@ for (i = 1; i < argc; i++) case 'q': receiving_message = FALSE; + if (queue_interval >= 0) + { + fprintf(stderr, "exim: -q specified more than once\n"); + exit(EXIT_FAILURE); + } /* -qq...: Do queue runs in a 2-stage manner */ @@ -2754,7 +2759,6 @@ for (i = 1; i < argc; i++) } } else deliver_selectstring = argrest; - if (queue_interval < 0) queue_interval = 0; break; @@ -2802,7 +2806,6 @@ for (i = 1; i < argc; i++) } } else deliver_selectstring_sender = argrest; - if (queue_interval < 0) queue_interval = 0; break; /* -Tqt is an option that is exclusively for use by the testing suite. @@ -2893,6 +2896,12 @@ for (i = 1; i < argc; i++) } +/* If -R or -S have been specified without -q, assume a single queue run. */ + +if ((deliver_selectstring != NULL || deliver_selectstring_sender != NULL) && + queue_interval < 0) queue_interval = 0; + + /* Arguments have been processed. Check for incompatibilities. */ END_ARG: |