masqmail

changeset 347:53cf6be5843a

Minor refactoring
author markus schnalke <meillo@marmaro.de>
date Thu, 14 Jul 2011 11:15:27 +0200
parents 1ca9bc4c6552
children a7a387253b2f
files src/smtp_in.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/src/smtp_in.c	Thu Jul 14 10:06:36 2011 +0200
     1.2 +++ b/src/smtp_in.c	Thu Jul 14 11:15:27 2011 +0200
     1.3 @@ -351,10 +351,11 @@
     1.4  				DEBUG(1) debugf("queuing forced by configuration or option.\n");
     1.5  			} else {
     1.6  				pid = fork();
     1.7 -				if (pid == 0) {
     1.8 +				if (pid < 0) {
     1.9 +					logwrite(LOG_ALERT, "could not fork for delivery, id = %s\n", msg->uid);
    1.10 +				} else if (pid == 0) {
    1.11 +					/* FIXME: most likely inverted exit code */
    1.12  					_exit(deliver(msg));
    1.13 -				} else if (pid < 0) {
    1.14 -					logwrite(LOG_ALERT, "could not fork for delivery, id = %s\n", msg->uid);
    1.15  				}
    1.16  			}
    1.17  			psc->rcpt_seen = psc->from_seen = FALSE;