Mercurial > hg > memcached
comparison memcached.c @ 3:0b6ac95a09bb default tip
Fix unix sockets support under FreeBSD.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 03 Oct 2007 05:34:42 +0400 |
parents | e28ab6bd21fa |
children |
comparison
equal
deleted
inserted
replaced
2:e28ab6bd21fa | 3:0b6ac95a09bb |
---|---|
217 /* this wipes msg_iovlen, msg_control, msg_controllen, and | 217 /* this wipes msg_iovlen, msg_control, msg_controllen, and |
218 msg_flags, the last 3 of which aren't defined on solaris: */ | 218 msg_flags, the last 3 of which aren't defined on solaris: */ |
219 memset(msg, 0, sizeof(struct msghdr)); | 219 memset(msg, 0, sizeof(struct msghdr)); |
220 | 220 |
221 msg->msg_iov = &c->iov[c->iovused]; | 221 msg->msg_iov = &c->iov[c->iovused]; |
222 msg->msg_name = &c->request_addr; | 222 |
223 msg->msg_namelen = c->request_addr_size; | 223 if (c->request_addr_size > 0) { |
224 msg->msg_name = &c->request_addr; | |
225 msg->msg_namelen = c->request_addr_size; | |
226 } | |
224 | 227 |
225 c->msgbytes = 0; | 228 c->msgbytes = 0; |
226 c->msgused++; | 229 c->msgused++; |
227 | 230 |
228 if (c->udp) { | 231 if (c->udp) { |