summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-12-13 13:55:02 +0100
committerStefan Metzmacher <metze@samba.org>2011-12-13 20:31:09 +0100
commit8a83464216156204c75c44e90fae55dc34cb389f (patch)
tree796c909e989ed1bd9f17396bfa56fb08fff6110b /source3
parent6fc8dc98ab0de1f2de7d086eee299d89f0527b6e (diff)
downloadsamba-8a83464216156204c75c44e90fae55dc34cb389f.tar.gz
samba-8a83464216156204c75c44e90fae55dc34cb389f.tar.bz2
samba-8a83464216156204c75c44e90fae55dc34cb389f.zip
s3:smbd: pass smbd_server_connection to smbd_setup_sig_term_handler()
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/process.c8
-rw-r--r--source3/smbd/proto.h2
-rw-r--r--source3/smbd/server.c2
3 files changed, 6 insertions, 6 deletions
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);