* sock_read_to(), sock_getln() flush the Migrate buffer before useage, just to be...
authorWilfried Göesgens <willi@citadel.org>
Fri, 21 May 2010 17:50:06 +0000 (17:50 +0000)
committerWilfried Göesgens <willi@citadel.org>
Fri, 21 May 2010 17:50:06 +0000 (17:50 +0000)
citadel/clientsocket.c

index a9190754c96c55e9d582184fa4a9b58f11746c8f..04e94d8707f9e1cc4a364b6b84d5c0a0afbb6af9 100644 (file)
@@ -180,6 +180,7 @@ int sock_read_to(int *sock, char *buf, int bytes, int timeout, int keep_reading_
        CitContext *CCC=CC;
        int rc;
 
+       FlushStrBuf(CCC->MigrateBuf);
        rc = socket_read_blob(sock, 
                              CCC->sMigrateBuf, 
                              bytes, 
@@ -236,6 +237,7 @@ int sock_getln(int *sock, char *buf, int bufsize)
        CitContext *CCC=CC;
        const char *pCh;
 
+       FlushStrBuf(CCC->sMigrateBuf);
        retval = CtdlSockGetLine(sock, CCC->sMigrateBuf);
 
        i = StrLength(CCC->sMigrateBuf);