]> code.citadel.org Git - citadel.git/blobdiff - webcit/who.c
* serv_getln now is a wrapper around existing functionality. a new temporary var...
[citadel.git] / webcit / who.c
index f93d9624d93cf67aa5961488512d769b1cc16c31..1c19f775796badd2400a7fe9ed6315ced801cff6 100644 (file)
@@ -49,9 +49,9 @@ int GetWholistSection(HashList *List, time_t now, StrBuf *Buf)
        const char *Pos;
 
        serv_puts("RWHO");
-       StrBuf_ServGetlnBuffered(Buf);
+       StrBuf_ServGetln(Buf);
        if (GetServerStatus(Buf, NULL) == 1) {
-               while (BufLen = StrBuf_ServGetlnBuffered(Buf), strcmp(ChrPtr(Buf), "000")) {
+               while (BufLen = StrBuf_ServGetln(Buf), strcmp(ChrPtr(Buf), "000")) {
                        if (BufLen <= 0)
                            continue;
                        Pos = NULL;
@@ -104,12 +104,9 @@ int GetWholistSection(HashList *List, time_t now, StrBuf *Buf)
                                    User, DestroyUserStruct);
                }
                SortByPayload(List, CompareUserStruct);
-
-               FreeStrBuf(&Buf);
                return 1;
        }
        else {
-               FreeStrBuf(&Buf);
                return 0;
        }
 }
@@ -222,7 +219,7 @@ HashList *GetWholistHash(StrBuf *Target, WCTemplputParams *TP)
        Buf = NewStrBuf();
 
        serv_puts("TIME");
-       StrBuf_ServGetlnBuffered(Buf);
+       StrBuf_ServGetln(Buf);
        if (GetServerStatus(Buf, NULL)  == 2) {
                const char *pos = ChrPtr(Buf) + 4;
                now = StrBufExtractNext_long(Buf, &pos, '|');