From: Art Cancro Date: Sat, 20 Mar 2004 05:03:14 +0000 (+0000) Subject: * Original startup thread becomes a worker thread after initialization. X-Git-Tag: v7.86~5519 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=5fab0efa808eac605dce70e8a86e52a2c4d51069;p=citadel.git * Original startup thread becomes a worker thread after initialization. Doing otherwise turns it into a zombie (at least on Linux) and possibly leads to other problems * Filter out NOOP's received in chat --- diff --git a/webcit/ChangeLog b/webcit/ChangeLog index a1cc91fcb..74e7fa141 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,10 @@ $Log$ +Revision 505.20 2004/03/20 05:03:14 ajc +* Original startup thread becomes a worker thread after initialization. + Doing otherwise turns it into a zombie (at least on Linux) and possibly + leads to other problems +* Filter out NOOP's received in chat + Revision 505.19 2004/03/18 04:32:24 ajc * Removed the language in README.TXT which told everyone that chat wouldn't work with a non-local Citadel server, because that's no longer true. @@ -1740,4 +1746,3 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix - diff --git a/webcit/paging.c b/webcit/paging.c index 7b149e932..6a3625d33 100644 --- a/webcit/paging.c +++ b/webcit/paging.c @@ -337,52 +337,55 @@ void chat_recv(void) { extract_token(cl_user, buf, 0, '|'); extract_token(cl_text, buf, 1, '|'); - wprintf("parent.chat_transcript.document.write('"); + if (strcasecmp(cl_text, "NOOP")) { - if (strcasecmp(cl_user, WC->last_chat_user)) { - wprintf("" - "
" - ); - - } - - wprintf(""); - - wprintf("
"); - - if (!strcasecmp(cl_user, ":")) { - wprintf(""); - } + wprintf("parent.chat_transcript.document.write('"); + + if (strcasecmp(cl_user, WC->last_chat_user)) { + wprintf("" + "
" + ); + + } - if (strcasecmp(cl_user, WC->last_chat_user)) { - wprintf(""); + wprintf(""); + + wprintf("
"); + + if (!strcasecmp(cl_user, ":")) { + wprintf(""); + } - if (!strcasecmp(cl_user, WC->wc_username)) { - wprintf(""); + if (strcasecmp(cl_user, WC->last_chat_user)) { + wprintf(""); + + if (!strcasecmp(cl_user, WC->wc_username)) { + wprintf(""); + } + else { + wprintf(""); + } + jsescputs(cl_user); + + wprintf(": "); } else { - wprintf(""); + wprintf("   "); + } + jsescputs(cl_text); + if (!strcasecmp(cl_user, ":")) { + wprintf(""); } - jsescputs(cl_user); - - wprintf(": "); - } - else { - wprintf("   "); - } - jsescputs(cl_text); - if (!strcasecmp(cl_user, ":")) { - wprintf(""); - } - wprintf("
"); - wprintf("'); \n"); + wprintf("
"); + wprintf("'); \n"); - strcpy(WC->last_chat_user, cl_user); + strcpy(WC->last_chat_user, cl_user); + } } wprintf("parent.chat_transcript.scrollTo(999999,999999);\">\n"); diff --git a/webcit/webserver.c b/webcit/webserver.c index 199379dc5..824d812a8 100644 --- a/webcit/webserver.c +++ b/webcit/webserver.c @@ -311,8 +311,8 @@ int main(int argc, char **argv) spawn_another_worker_thread(); } - /* now the original thread can go away. */ - pthread_exit(NULL); + /* now the original thread becomes another worker */ + worker_entry(); return 0; }