diff options
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd.c | 4 | ||||
-rw-r--r-- | source3/nmbd/nmbd_packets.c | 16 |
2 files changed, 7 insertions, 13 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index 10d6fe2378..0922e455a3 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -441,10 +441,6 @@ static void process(void) time_t t = time(NULL); TALLOC_CTX *frame = talloc_stackframe(); - /* Check for internal messages */ - - message_dispatch(nmbd_messaging_context()); - /* * Check all broadcast subnets to see if * we need to run an election on any of them. diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index 66b584ad54..489034899e 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -1773,6 +1773,11 @@ bool listen_for_packets(bool run_election) } #endif + /* Process a signal and timer events now... */ + if (run_events(nmbd_event_context(), 0, NULL, NULL)) { + return False; + } + /* * During elections and when expecting a netbios response packet we * need to send election packets at tighter intervals. @@ -1789,13 +1794,6 @@ bool listen_for_packets(bool run_election) &r_fds, &w_fds, &timeout, &maxfd); } - if (timeval_is_zero(&timeout)) { - /* Process a timed event now... */ - if (run_events(nmbd_event_context(), 0, NULL, NULL)) { - return False; - } - } - /* Prepare for the select - allow certain signals. */ BlockSignals(False, SIGTERM); @@ -1806,11 +1804,11 @@ bool listen_for_packets(bool run_election) BlockSignals(True, SIGTERM); - if(selrtn == -1) { + if (run_events(nmbd_event_context(), selrtn, &r_fds, &w_fds)) { return False; } - if (run_events(nmbd_event_context(), selrtn, &r_fds, &w_fds)) { + if (selrtn == -1) { return False; } |