[memcached] kronuz, r411: Fixed issue with sendmsg()
commits at code.sixapart.com
commits at code.sixapart.com
Wed Oct 11 16:16:27 UTC 2006
Fixed issue with sendmsg()
U branches/server-win32/Win32-Code/win32.h
Modified: branches/server-win32/Win32-Code/win32.h
===================================================================
--- branches/server-win32/Win32-Code/win32.h 2006-09-21 02:47:42 UTC (rev 410)
+++ branches/server-win32/Win32-Code/win32.h 2006-10-11 16:16:25 UTC (rev 411)
@@ -94,8 +94,12 @@
for(cp = wrkbuf, ep = wrkbuf + MAXPACKETSIZE; --len >= 0; iov++) {
int plen = iov->iov_len;
if (cp + plen >= ep) {
- WSASetLastError(E2BIG);
- return -1;
+ if(cp == wrkbuf) {
+ WSASetLastError(E2BIG);
+ return -1;
+ }
+ ret = send(s, (char*)wrkbuf, cp - wrkbuf, flags);
+ cp = wrkbuf;
}
memcpy(cp, iov->iov_base, plen);
cp += plen;
More information about the memcached-commits
mailing list