return server_event_context();
}
-struct messaging_context *nmbd_messaging_context(void)
+static struct messaging_context *nmbd_messaging_context(void)
{
struct messaging_context *msg_ctx = server_messaging_context();
if (likely(msg_ctx != NULL)) {
The main select loop.
**************************************************************************** */
-static void process(void)
+static void process(struct messaging_context *msg)
{
bool run_election;
* (nmbd_packets.c)
*/
- if(listen_for_packets(run_election)) {
+ if (listen_for_packets(msg, run_election)) {
TALLOC_FREE(frame);
return;
}
/* Setup the async dns. We do it here so it doesn't have all the other
stuff initialised and thus chewing memory and sockets */
if(lp_we_are_a_wins_server() && lp_dns_proxy()) {
- start_async_dns();
+ start_async_dns(nmbd_messaging_context());
}
#endif
}
TALLOC_FREE(frame);
- process();
+ process(nmbd_messaging_context());
kill_async_dns_child();
return(0);