[memcached] sgrimm,
r363: Always read UDP-based commands from the ...
commits at code.sixapart.com
commits at code.sixapart.com
Tue Sep 5 02:37:31 UTC 2006
Always read UDP-based commands from the front of the packet; we fixed this
a while ago but I apparently never sent a patch out to the mailing list.
U trunk/server/memcached.c
Modified: trunk/server/memcached.c
===================================================================
--- trunk/server/memcached.c 2006-09-05 01:41:43 UTC (rev 362)
+++ trunk/server/memcached.c 2006-09-05 02:37:30 UTC (rev 363)
@@ -1236,10 +1236,10 @@
int res;
c->request_addr_size = sizeof(c->request_addr);
- res = recvfrom(c->sfd, c->rbuf + c->rbytes, c->rsize - c->rbytes,
+ res = recvfrom(c->sfd, c->rbuf, c->rsize,
0, &c->request_addr, &c->request_addr_size);
if (res > 8) {
- unsigned char *buf = (unsigned char *)c->rbuf + c->rbytes;
+ unsigned char *buf = (unsigned char *)c->rbuf;
stats.bytes_read += res;
/* Beginning of UDP packet is the request ID; save it. */
More information about the memcached-commits
mailing list