/* The following definitions come from smbd/process.c */
void smbd_setup_sig_term_handler(void);
-void smbd_setup_sig_hup_handler(void);
+void smbd_setup_sig_hup_handler(struct tevent_context *ev,
+ struct messaging_context *msg_ctx);
bool srv_send_smb(int fd, char *buffer,
bool no_signing, uint32_t seqnum,
bool do_encrypt,
}
smbd_setup_sig_term_handler();
- smbd_setup_sig_hup_handler();
+ smbd_setup_sig_hup_handler(server_event_context(),
+ server_messaging_context());
if (!serverid_register(procid_self(),
FLAG_MSG_GENERAL|FLAG_MSG_SMBD
reload_services(msg_ctx, False);
}
-void smbd_setup_sig_hup_handler(void)
+void smbd_setup_sig_hup_handler(struct tevent_context *ev,
+ struct messaging_context *msg_ctx)
{
struct tevent_signal *se;
- se = tevent_add_signal(smbd_event_context(),
- smbd_event_context(),
- SIGHUP, 0,
- smbd_sig_hup_handler,
- smbd_messaging_context());
+ se = tevent_add_signal(ev, ev, SIGHUP, 0, smbd_sig_hup_handler,
+ msg_ctx);
if (!se) {
exit_server("failed to setup SIGHUP handler");
}
}
smbd_setup_sig_term_handler();
- smbd_setup_sig_hup_handler();
+ smbd_setup_sig_hup_handler(server_event_context(),
+ server_messaging_context());
if (!serverid_register(procid_self(),
FLAG_MSG_GENERAL|FLAG_MSG_SMBD
smbd_server_conn->msg_ctx = smbd_messaging_context();
smbd_setup_sig_term_handler();
- smbd_setup_sig_hup_handler();
+ smbd_setup_sig_hup_handler(smbd_event_context(),
+ smbd_server_conn->msg_ctx);
/* Setup all the TDB's - including CLEAR_IF_FIRST tdb's. */