* make shure the buffer is cleared
authorWilfried Göesgens <willi@citadel.org>
Mon, 21 Dec 2009 12:41:20 +0000 (12:41 +0000)
committerWilfried Göesgens <willi@citadel.org>
Mon, 21 Dec 2009 12:41:20 +0000 (12:41 +0000)
* if the result is unexpected, log an error

webcit/useredit.c

index e14a53a721bb693c43962c51462591aa60517f10..b1d2479fe73024fec01fd32ec7ba4ca8f7f65501 100644 (file)
@@ -467,6 +467,7 @@ TRYAGAIN:
 
        /* If there's no vcard, create one */
        if ((*VCMsg == NULL) && (already_tried_creating_one == 0)) {
+               FlushStrBuf(Buf);
                already_tried_creating_one = 1;
                serv_puts("ENT0 1|||4");
                StrBuf_ServGetln(Buf);
@@ -477,6 +478,8 @@ TRYAGAIN:
                        serv_puts("end:vcard");
                        serv_puts("000");
                }
+               else 
+                       lprintf(1, "Error while creating user vcard: %s\n", ChrPtr(Buf));
                goto TRYAGAIN;
        }
        FreeStrBuf(&Buf);