Negated a strcmp in netconf.c that caused the function to hang every single time...
authorArt Cancro <ajc@uncensored.citadel.org>
Wed, 7 Sep 2011 19:43:37 +0000 (15:43 -0400)
committerWilfried Goesgens <dothebart@citadel.org>
Tue, 13 Sep 2011 16:56:56 +0000 (16:56 +0000)
webcit/netconf.c
webcit/tcp_sockets.c

index 8683879ffc2bbd74873bda4caad4855a7a21d508..a426217114c97cd6dbae6527f88e7f384e9c3ae2 100644 (file)
@@ -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;
index da483deabceab4b9c1f0162169495d69411b738b..bb4d6015e1b187b8d2f415f2ed4acdb80b9ca2ce 100644 (file)
@@ -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"