* buffered read next try; recv might give the solution?
authorWilfried Göesgens <willi@citadel.org>
Sun, 11 Nov 2007 18:58:39 +0000 (18:58 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 11 Nov 2007 18:58:39 +0000 (18:58 +0000)
citadel/citadel_ipc.c

index 0a16b3107ce30be969d1ba8134c690c0724e4578..22675568113e60d05124673c20cb59c4df42ea2b 100644 (file)
@@ -2904,7 +2904,8 @@ ReadNetworkChunk(CtdlIPC* ipc)
                if (ret > 0) {
                        
                        *(ipc->BufPtr) = '\0';
-                       n = read(ipc->sock, ipc->BufPtr, ipc->BufSize  - (ipc->BufPtr - ipc->Buf) - 1);
+//                     n = read(ipc->sock, ipc->BufPtr, ipc->BufSize  - (ipc->BufPtr - ipc->Buf) - 1);
+                       n = recv(ipc->sock, ipc->BufPtr, ipc->BufSize  - (ipc->BufPtr - ipc->Buf) - 1, 0);
                        if (n > 0) {
                                ipc->BufPtr[n]='\0';
                                ipc->BufUsed += n;
@@ -2938,7 +2939,7 @@ ReadNetworkChunk(CtdlIPC* ipc)
 /*
  * input string from socket - implemented in terms of serv_read()
  */
-
+#define CHUNKED_READ
 #ifdef CHUNKED_READ
 
 static void CtdlIPC_getline(CtdlIPC* ipc, char *buf)