diff options
Diffstat (limited to 'contrib/sendmail/src/daemon.c')
-rw-r--r-- | contrib/sendmail/src/daemon.c | 37 |
1 files changed, 7 insertions, 30 deletions
diff --git a/contrib/sendmail/src/daemon.c b/contrib/sendmail/src/daemon.c index d12e162..267f363 100644 --- a/contrib/sendmail/src/daemon.c +++ b/contrib/sendmail/src/daemon.c @@ -13,7 +13,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: daemon.c,v 8.613.2.14 2003/02/11 17:17:22 ca Exp $") +SM_RCSID("@(#)$Id: daemon.c,v 8.613.2.17 2003/07/30 20:17:04 ca Exp $") #if defined(SOCK_STREAM) || defined(__GNU_LIBRARY__) # define USE_SOCK_STREAM 1 @@ -235,13 +235,7 @@ getrequests(e) /* see if we are rejecting connections */ (void) sm_blocksignal(SIGALRM); - - if (ShutdownRequest != NULL) - shutdown_daemon(); - else if (RestartRequest != NULL) - restart_daemon(); - else if (RestartWorkGroup) - restart_marked_work_groups(); + CHECK_RESTART; for (idx = 0; idx < NDaemons; idx++) { @@ -283,13 +277,7 @@ getrequests(e) } /* May have been sleeping above, check again */ - if (ShutdownRequest != NULL) - shutdown_daemon(); - else if (RestartRequest != NULL) - restart_daemon(); - else if (RestartWorkGroup) - restart_marked_work_groups(); - + CHECK_RESTART; getrequests_checkdiskspace(e); #if XDEBUG @@ -335,15 +323,8 @@ getrequests(e) fd_set readfds; struct timeval timeout; - if (ShutdownRequest != NULL) - shutdown_daemon(); - else if (RestartRequest != NULL) - restart_daemon(); - else if (RestartWorkGroup) - restart_marked_work_groups(); - + CHECK_RESTART; FD_ZERO(&readfds); - for (idx = 0; idx < NDaemons; idx++) { /* wait for a connection */ @@ -380,13 +361,7 @@ getrequests(e) NULL, NULL, &timeout); /* Did someone signal while waiting? */ - if (ShutdownRequest != NULL) - shutdown_daemon(); - else if (RestartRequest != NULL) - restart_daemon(); - else if (RestartWorkGroup) - restart_marked_work_groups(); - + CHECK_RESTART; curdaemon = -1; @@ -3363,7 +3338,9 @@ getauthinfo(fd, may_be_forged) /* try to match the reverse against the forward lookup */ hp = sm_gethostbyname(RealHostName, family); if (hp == NULL) + { *may_be_forged = true; + } else { for (ha = hp->h_addr_list; *ha != NULL; ha++) |