diff options
author | Jeremy Allison <jra@samba.org> | 2017-03-31 11:59:13 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-04-17 19:13:07 +0200 |
commit | cc14187c5ced700f99162d9e3425bb5b87bb70e9 (patch) | |
tree | 8798fe9604b1bda3b51af7bd5538cab58660257a /source4/smbd/server.c | |
parent | a7d0e54969701f61a9b05fd7ef2141e1fd673a81 (diff) | |
download | samba-cc14187c5ced700f99162d9e3425bb5b87bb70e9.tar.gz |
s4: server: Use server_state as a parameter to stdin handler, not just name.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source4/smbd/server.c')
-rw-r--r-- | source4/smbd/server.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/smbd/server.c b/source4/smbd/server.c index 8e807ca21a0..97f0c02cac6 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -165,11 +165,12 @@ static void server_stdin_handler(struct tevent_context *event_ctx, uint16_t flags, void *private_data) { - const char *binary_name = (const char *)private_data; + struct server_state *state = talloc_get_type_abort( + private_data, struct server_state); uint8_t c; if (read(0, &c, 1) == 0) { DEBUG(0,("%s: EOF on stdin - PID %d terminating\n", - binary_name, (int)getpid())); + state->binary_name, (int)getpid())); #if HAVE_GETPGRP if (getpgrp() == getpid()) { DEBUG(0,("Sending SIGTERM from pid %d\n", @@ -497,7 +498,7 @@ static int binary_smbd_main(const char *binary_name, 0, stdin_event_flags, server_stdin_handler, - discard_const(binary_name)); + state); } if (max_runtime) { |