diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-03-15 03:06:50 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-03-15 03:06:50 +0000 |
commit | 86f5105fbca56ab07f8a33e892fe656672600388 (patch) | |
tree | 8e6028f42d592e382dd77a55768a3ac82c32ddde /source3/web | |
parent | 08a6e255fe8dec721b57aa15a4e606b11dc7f44d (diff) | |
download | samba-86f5105fbca56ab07f8a33e892fe656672600388.tar.gz samba-86f5105fbca56ab07f8a33e892fe656672600388.tar.bz2 samba-86f5105fbca56ab07f8a33e892fe656672600388.zip |
- 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)
Diffstat (limited to 'source3/web')
-rw-r--r-- | source3/web/statuspage.c | 19 |
1 files changed, 10 insertions, 9 deletions
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("<FORM method=post>\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("<tr><td>%d</td><td>%s</td><td>%s</td><td>%s</td><td><input type=submit value=\"X\" name=\"kill_%d\"></td></tr>\n", crec.pid, crec.machine,crec.addr, |