Revision: 14477 Author: adrian.chadd Date: Tue Mar 23 05:40:31 2010 Log: Re-define HELLO_BUF_SZ to be the exact length of the written data - ie, the string length plus the trailing \0.
This is an attempt to fix Issue #87 - the initial read on the IPC socket was capturing the hello string and the first chunk of the rebuild data stream; thus the rebuild stream was never quite "valid". http://code.google.com/p/lusca-cache/source/detail?r=14477 Modified: /branches/LUSCA_HEAD/libhelper/ipc.c ======================================= --- /branches/LUSCA_HEAD/libhelper/ipc.c Wed Jul 22 07:37:20 2009 +++ /branches/LUSCA_HEAD/libhelper/ipc.c Tue Mar 23 05:40:31 2010 @@ -76,7 +76,7 @@ #include "ipc.h" static const char *hello_string = "hi there\n"; -#define HELLO_BUF_SZ 32 +#define HELLO_BUF_SZ 11 static char hello_buf[HELLO_BUF_SZ]; /* XXX */ @@ -274,6 +274,7 @@ sqinet_done(&CS); return ipcCloseAllFD(prfd, pwfd, crfd, cwfd); } + debug(54, 2) ("ipcCreate: hello read: %d bytes\n", x); commSetTimeout(prfd, -1, NULL, NULL); commSetNonBlocking(prfd); commSetNonBlocking(pwfd); -- You received this message because you are subscribed to the Google Groups "lusca-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/lusca-commit?hl=en.
