From 86f5105fbca56ab07f8a33e892fe656672600388 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 15 Mar 1998 03:06:50 +0000 Subject: - claim the null connection after the session request to mak sure we have the netbios name - fix another kill connection bug (This used to be commit c634b799874795d42dae28fb4440ea452dc89b1b) --- source3/web/statuspage.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'source3/web/statuspage.c') diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c index 0031adde9f..25a45928f2 100644 --- a/source3/web/statuspage.c +++ b/source3/web/statuspage.c @@ -67,8 +67,6 @@ void status_page(void) struct connect_record crec; pstring fname; FILE *f; - int i, pid; - char *v; if (cgi_variable("smbd_start")) { start_smbd(); @@ -86,6 +84,12 @@ void status_page(void) stop_nmbd(); } + pstrcpy(fname,lp_lockdir()); + standard_sub_basic(fname); + trim_string(fname,"","/"); + strcat(fname,"/STATUS..LCK"); + + f = fopen(fname,"r"); if (f) { while (!feof(f)) { @@ -95,7 +99,7 @@ void status_page(void) char buf[30]; sprintf(buf,"kill_%d", crec.pid); if (cgi_variable(buf)) { - kill_pid(pid); + kill_pid(crec.pid); } } } @@ -106,11 +110,6 @@ void status_page(void) printf("
\n"); - pstrcpy(fname,lp_lockdir()); - standard_sub_basic(fname); - trim_string(fname,"","/"); - strcat(fname,"/STATUS..LCK"); - f = fopen(fname,"r"); if (!f) { printf("Couldn't open status file %s\n",fname); @@ -152,7 +151,9 @@ void status_page(void) while (!feof(f)) { if (fread(&crec,sizeof(crec),1,f) != 1) break; - if (crec.magic == 0x280267 && process_exists(crec.pid)) { + if (crec.magic == 0x280267 && + crec.cnum == -1 && + process_exists(crec.pid)) { printf("%d%s%s%s\n", crec.pid, crec.machine,crec.addr, -- cgit