From 6056766247fc2e7206d6bb13ad1ac467663ac298 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 7 May 2001 03:55:54 +0000 Subject: merge some fixes from 2.2 (This used to be commit 7e57adf2a039cb5b6458496f9190c9c642645600) --- source3/web/statuspage.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3/web') diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c index 5c800797c0..27a40d1695 100644 --- a/source3/web/statuspage.c +++ b/source3/web/statuspage.c @@ -21,6 +21,7 @@ #include "includes.h" +static pid_t smbd_pid; static char *tstring(time_t t) { @@ -93,7 +94,8 @@ static int traverse_fn2(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void* st struct connections_data crec; memcpy(&crec, dbuf.dptr, sizeof(crec)); - if (crec.cnum != -1 || !process_exists(crec.pid)) return 0; + if (crec.cnum != -1 || !process_exists(crec.pid) || + (crec.pid == smbd_pid)) return 0; printf("%d%s%s%s\n", (int)crec.pid, @@ -133,6 +135,8 @@ void status_page(void) int refresh_interval=30; TDB_CONTEXT *tdb; + smbd_pid = pidfile_pid("smbd"); + if (cgi_variable("smbd_restart")) { stop_smbd(); start_smbd(); -- cgit