diff options
author | Jeremy Allison <jra@samba.org> | 2017-03-31 12:00:29 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-04-17 19:13:07 +0200 |
commit | d721b8d86b2f2355bd74c13da010843afcd8c3d2 (patch) | |
tree | 0b3bb8f029df23674116f37985c3a7894592d0b4 /source4/smbd/server.c | |
parent | cc14187c5ced700f99162d9e3425bb5b87bb70e9 (diff) | |
download | samba-d721b8d86b2f2355bd74c13da010843afcd8c3d2.tar.gz |
s4: server: Use server_state as a parameter to max_runtime_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 97f0c02cac6..96f9d9d2347 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -189,10 +189,11 @@ _NORETURN_ static void max_runtime_handler(struct tevent_context *ev, struct tevent_timer *te, struct timeval t, void *private_data) { - const char *binary_name = (const char *)private_data; + struct server_state *state = talloc_get_type_abort( + private_data, struct server_state); DEBUG(0,("%s: maximum runtime exceeded - " "terminating PID %d at %llu, current ts: %llu\n", - binary_name, + state->binary_name, (int)getpid(), (unsigned long long)t.tv_sec, (unsigned long long)time(NULL))); @@ -509,7 +510,7 @@ static int binary_smbd_main(const char *binary_name, tevent_add_timer(state->event_ctx, state->event_ctx, timeval_current_ofs(max_runtime, 0), max_runtime_handler, - discard_const(binary_name)); + state); } if (lpcfg_server_role(cmdline_lp_ctx) != ROLE_ACTIVE_DIRECTORY_DC |