[dovecot-cvs] dovecot/src/lib fdpass.c,1.29,1.30
cras at procontrol.fi
cras at procontrol.fi
Sun Jun 20 00:44:03 EEST 2004
Update of /home/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv13205
Modified Files:
fdpass.c
Log Message:
Fix for the previous Solaris fix. fd_send() was sending two fds.
Index: fdpass.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/fdpass.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- fdpass.c 14 Jun 2004 23:42:23 -0000 1.29
+++ fdpass.c 19 Jun 2004 21:44:01 -0000 1.30
@@ -32,11 +32,10 @@
#ifndef CMSG_SPACE
# if defined(_CMSG_DATA_ALIGN) && defined(_CMSG_HDR_ALIGN) /* for Solaris */
-# define CMSG_ALIGN(len) _CMSG_DATA_ALIGN(len)
# define CMSG_SPACE(len) \
(_CMSG_DATA_ALIGN(len) + _CMSG_HDR_ALIGN(sizeof(struct cmsghdr)))
# define CMSG_LEN(len) \
- (_CMSG_HDR_ALIGN(sizeof(struct cmsghdr)) + (len))
+ (_CMSG_DATA_ALIGN(sizeof(struct cmsghdr)) + (len))
# else
# define CMSG_ALIGN(len) \
(((len) + sizeof(size_t) - 1) & ~(sizeof(size_t) - 1))
@@ -69,6 +68,7 @@
if (send_fd != -1) {
/* set the control and controllen before CMSG_FIRSTHDR() */
+ memset(buf, 0, sizeof(buf));
msg.msg_control = buf;
msg.msg_controllen = sizeof(buf);
More information about the dovecot-cvs
mailing list