summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Beck <gbeck@sernet.de>2012-08-28 09:31:59 +0200
committerMichael Adam <obnox@samba.org>2012-10-19 12:14:59 +0200
commitb237bbc0d1afdfea3b6b6335854f92d6fe80a151 (patch)
treec5e2713d1c97721110cefd74e70c85e0f0286383
parentd5c273919d129f884d5fb13e06ad73e01c7176e1 (diff)
downloadsamba-b237bbc0d1afdfea3b6b6335854f92d6fe80a151.tar.gz
samba-b237bbc0d1afdfea3b6b6335854f92d6fe80a151.tar.bz2
samba-b237bbc0d1afdfea3b6b6335854f92d6fe80a151.zip
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>
-rw-r--r--source3/utils/smbcontrol.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index c91c0f3d16..900ae9a9f0 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -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;