From e587f365a69947d55668dba7ffa8ead4d3494504 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sun, 24 Jul 2011 14:30:21 -0400 Subject: [PATCH] The monitoring page plays really stupid games with the session. Eliminate all. --- webcit/auth.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/webcit/auth.c b/webcit/auth.c index 656dfdc6f..994c00c97 100644 --- a/webcit/auth.c +++ b/webcit/auth.c @@ -565,33 +565,20 @@ void do_logout(void) */ void monitor(void) { - wcsession *WCC = WC; - char buf[SIZ]; - - FlushStrBuf(WCC->wc_username); - FlushStrBuf(WCC->wc_password); - FlushStrBuf(WCC->wc_fullname); - FlushRoomlist(); - - serv_puts("LOUT"); - serv_getln(buf, sizeof buf); - WCC->logged_in = 0; + output_headers(0, 0, 0, 0, 0, 0); - FlushStrBuf(WCC->CurRoom.name); - - /* Calling output_headers() this way causes the cookies to be un-set */ - output_headers(1, 0, 0, 1, 1, 0); + hprintf("Content-type: text/plain\r\n" + "Server: " PACKAGE_STRING "\r\n" + "Connection: close\r\n" + ); + begin_burst(); - wc_printf(""); - wc_printf("WebCit monitoring screen
\n"); - wc_printf("Connection to Citadel server at %s:%s : %s
\n", + wc_printf("Connection to Citadel server at %s:%s : %s\r\n", ctdlhost, ctdlport, (WC->connected ? "SUCCESS" : "FAIL") ); - wc_printf("\n"); - wDumpContent(2); - end_webcit_session(); + wDumpContent(0); } -- 2.30.2