return NULL;
in_addr_to_sockaddr_storage(&ss, subrec->bcast_ip);
- pss = iface_ip(&ss);
+ pss = iface_ip((struct sockaddr *)&ss);
if (!pss || pss->ss_family != AF_INET) {
p->locked = False;
free_packet(p);
}
#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.
&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);
-
selrtn = sys_select(maxfd+1,&r_fds,&w_fds,NULL,&timeout);
- /* We can only take signals when we are in the select - block them again here. */
-
- 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;
}