comparison src/smtp_in.c @ 347:53cf6be5843a

Minor refactoring
author markus schnalke <meillo@marmaro.de>
date Thu, 14 Jul 2011 11:15:27 +0200
parents 794071925a22
children 41958685480d
comparison
equal deleted inserted replaced
346:1ca9bc4c6552 347:53cf6be5843a
349 349
350 if (conf.do_queue) { 350 if (conf.do_queue) {
351 DEBUG(1) debugf("queuing forced by configuration or option.\n"); 351 DEBUG(1) debugf("queuing forced by configuration or option.\n");
352 } else { 352 } else {
353 pid = fork(); 353 pid = fork();
354 if (pid == 0) { 354 if (pid < 0) {
355 logwrite(LOG_ALERT, "could not fork for delivery, id = %s\n", msg->uid);
356 } else if (pid == 0) {
357 /* FIXME: most likely inverted exit code */
355 _exit(deliver(msg)); 358 _exit(deliver(msg));
356 } else if (pid < 0) {
357 logwrite(LOG_ALERT, "could not fork for delivery, id = %s\n", msg->uid);
358 } 359 }
359 } 360 }
360 psc->rcpt_seen = psc->from_seen = FALSE; 361 psc->rcpt_seen = psc->from_seen = FALSE;
361 destroy_message(msg); 362 destroy_message(msg);
362 msg = NULL; 363 msg = NULL;