diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-05-07 03:55:54 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-05-07 03:55:54 +0000 |
commit | 6056766247fc2e7206d6bb13ad1ac467663ac298 (patch) | |
tree | e20ebeed5bb331f747c9d5a0fbf6b07e601ec186 /source3/web | |
parent | fe6b398a79e6a8efaeef173dc4a41ff4a8ec3b33 (diff) | |
download | samba-6056766247fc2e7206d6bb13ad1ac467663ac298.tar.gz samba-6056766247fc2e7206d6bb13ad1ac467663ac298.tar.bz2 samba-6056766247fc2e7206d6bb13ad1ac467663ac298.zip |
merge some fixes from 2.2
(This used to be commit 7e57adf2a039cb5b6458496f9190c9c642645600)
Diffstat (limited to 'source3/web')
-rw-r--r-- | source3/web/statuspage.c | 6 |
1 files changed, 5 insertions, 1 deletions
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("<tr><td>%d</td><td>%s</td><td>%s</td><td>%s</td>\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(); |