From: Art Cancro Date: Wed, 7 Sep 2011 19:43:37 +0000 (-0400) Subject: Negated a strcmp in netconf.c that caused the function to hang every single time... X-Git-Tag: v8.11~468 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=92d54d5413cc630032e81c9680f5e5089c9edbcc Negated a strcmp in netconf.c that caused the function to hang every single time, how did this get this way? --- diff --git a/webcit/netconf.c b/webcit/netconf.c index 8683879ff..a42621711 100644 --- a/webcit/netconf.c +++ b/webcit/netconf.c @@ -88,14 +88,13 @@ HashList *load_netconf(StrBuf *Target, WCTemplputParams *TP) Hash = NewHash(1, NULL); Buf = NewStrBuf(); - while ((len = StrBuf_ServGetln(Buf), - (len != 3) || !strcmp(ChrPtr(Buf), "000"))) { + while (len = StrBuf_ServGetln(Buf), strcmp(ChrPtr(Buf), "000")) { Node = NewNode(Buf); - if (Node == NULL) - continue; - nUsed = GetCount(Hash); - nUsed = snprintf(nnn, sizeof(nnn), "%d", nUsed+1); - Put(Hash, nnn, nUsed, Node, DeleteNodeConf); + if (Node != NULL) { + nUsed = GetCount(Hash); + nUsed = snprintf(nnn, sizeof(nnn), "%d", nUsed+1); + Put(Hash, nnn, nUsed, Node, DeleteNodeConf); + } } FreeStrBuf(&Buf); return Hash; diff --git a/webcit/tcp_sockets.c b/webcit/tcp_sockets.c index da483deab..bb4d6015e 100644 --- a/webcit/tcp_sockets.c +++ b/webcit/tcp_sockets.c @@ -18,8 +18,8 @@ /* * Uncomment this to log all communications with the Citadel server -#define SERV_TRACE 1 */ +#define SERV_TRACE 1 #include "webcit.h"