From 8a83464216156204c75c44e90fae55dc34cb389f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 13 Dec 2011 13:55:02 +0100 Subject: s3:smbd: pass smbd_server_connection to smbd_setup_sig_term_handler() metze --- source3/smbd/process.c | 8 ++++---- source3/smbd/proto.h | 2 +- source3/smbd/server.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/process.c b/source3/smbd/process.c index dffb855f0b..a2cccaad43 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -878,15 +878,15 @@ static void smbd_sig_term_handler(struct tevent_context *ev, exit_server_cleanly("termination signal"); } -void smbd_setup_sig_term_handler(void) +void smbd_setup_sig_term_handler(struct smbd_server_connection *sconn) { struct tevent_signal *se; - se = tevent_add_signal(server_event_context(), - server_event_context(), + se = tevent_add_signal(sconn->ev_ctx, + sconn, SIGTERM, 0, smbd_sig_term_handler, - NULL); + sconn); if (!se) { exit_server("failed to setup SIGTERM handler"); } diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index d7a7c4e4b5..bf759f5304 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -755,7 +755,7 @@ NTSTATUS make_default_filesystem_acl(TALLOC_CTX *ctx, /* The following definitions come from smbd/process.c */ -void smbd_setup_sig_term_handler(void); +void smbd_setup_sig_term_handler(struct smbd_server_connection *sconn); void smbd_setup_sig_hup_handler(struct tevent_context *ev, struct messaging_context *msg_ctx); bool srv_send_smb(struct smbd_server_connection *sconn, char *buffer, diff --git a/source3/smbd/server.c b/source3/smbd/server.c index bef1a13859..f7edc9996e 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -460,7 +460,7 @@ static void smbd_accept_connection(struct tevent_context *ev, smb_panic("reinit_after_fork() failed"); } - smbd_setup_sig_term_handler(); + smbd_setup_sig_term_handler(sconn); smbd_setup_sig_hup_handler(ev, msg_ctx); -- cgit