X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fgroupdav_propfind.c;h=f644bb740a834d3dd9759a55ac4f85d1fb3bd9c1;hb=fa4703876cbb0330af860bb686d044ddb59dbadb;hp=ab1b2e807039283454484c5052fe484d906e25ba;hpb=7e64ad8fc5bffee21a5f3815dad572300b33af36;p=citadel.git diff --git a/webcit/groupdav_propfind.c b/webcit/groupdav_propfind.c index ab1b2e807..f644bb740 100644 --- a/webcit/groupdav_propfind.c +++ b/webcit/groupdav_propfind.c @@ -12,7 +12,7 @@ * * Copyright (c) 2005-2010 by the citadel.org team * - * This program is free software; you can redistribute it and/or modify + * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. @@ -155,7 +155,7 @@ const folder *GetRESTFolder(int IgnoreFloor, HashList *Subfolders) { DeleteHashPos(&itd); - lprintf(0, "5\n"); + syslog(0, "5\n"); continue; } DeleteHashPos(&itd); @@ -166,7 +166,7 @@ const folder *GetRESTFolder(int IgnoreFloor, HashList *Subfolders) { DeleteHashPos(&itd); - lprintf(0, "5\n"); + syslog(0, "5\n"); continue; } DeleteHashPos(&itfl); @@ -680,7 +680,10 @@ void groupdav_propfind(void) StrBuf_ServGetln(MsgNum); if (GetServerStatus(MsgNum, NULL) == 1) - while (BufLen = StrBuf_ServGetln(MsgNum), strcmp(ChrPtr(MsgNum), "000")) { + while (BufLen = StrBuf_ServGetln(MsgNum), + ((BufLen >= 0) && + ((BufLen != 3) || strcmp(ChrPtr(MsgNum), "000")) )) + { msgs = realloc(msgs, ++num_msgs * sizeof(long)); msgs[num_msgs-1] = StrTol(MsgNum); } @@ -692,7 +695,9 @@ void groupdav_propfind(void) serv_printf("MSG0 %ld|3", msgs[i]); StrBuf_ServGetln(MsgNum); if (GetServerStatus(MsgNum, NULL) == 1) - while (BufLen = StrBuf_ServGetln(MsgNum), strcmp(ChrPtr(MsgNum), "000")) + while (BufLen = StrBuf_ServGetln(MsgNum), + ((BufLen >= 0) && + ((BufLen != 3) || strcmp(ChrPtr(MsgNum), "000")) )) { if (!strncasecmp(ChrPtr(MsgNum), "exti=", 5)) { strcpy(uid, &ChrPtr(MsgNum)[5]);