mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
s3:smbcontrol: don't do stack_trace by connection but by server_id.
Inparticular use serverid_traverse_read instead of connections_foralli to enumerate processes. Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
d5c273919d
commit
b237bbc0d1
@ -321,12 +321,13 @@ cleanup:
|
||||
ptrace(PTRACE_DETACH, pid, NULL, NULL);
|
||||
}
|
||||
|
||||
static int stack_trace_connection(const struct connections_key *key,
|
||||
const struct connections_data *crec,
|
||||
void *priv)
|
||||
static int stack_trace_server(const struct server_id *id,
|
||||
uint32_t msg_flags,
|
||||
void *priv)
|
||||
{
|
||||
print_stack_trace(procid_to_pid(&crec->pid), (int *)priv);
|
||||
|
||||
if (id->vnn == get_my_vnn()) {
|
||||
print_stack_trace(procid_to_pid(&id->pid), (int *)priv);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -353,7 +354,7 @@ static bool do_daemon_stack_trace(struct tevent_context *ev_ctx,
|
||||
*/
|
||||
print_stack_trace(dest, &count);
|
||||
} else {
|
||||
connections_forall_read(stack_trace_connection, &count);
|
||||
serverid_traverse_read(stack_trace_server, &count);
|
||||
}
|
||||
|
||||
return True;
|
||||
|
Loading…
x
Reference in New Issue
Block a user