[svn] commit: r3026 - in /branches/trac299/src: bin/xfrout/xfrout.py.in lib/xfr/fd_share.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Sep 27 03:15:27 UTC 2010
Author: chenzhengzhang
Date: Mon Sep 27 03:15:27 2010
New Revision: 3026
Log:
recv_fd() will return different value to distinguish shutdown event from error handling.
Modified:
branches/trac299/src/bin/xfrout/xfrout.py.in
branches/trac299/src/lib/xfr/fd_share.cc
Modified: branches/trac299/src/bin/xfrout/xfrout.py.in
==============================================================================
--- branches/trac299/src/bin/xfrout/xfrout.py.in (original)
+++ branches/trac299/src/bin/xfrout/xfrout.py.in Mon Sep 27 03:15:27 2010
@@ -81,8 +81,8 @@
# This may happen when one xfrout process try to connect to
# xfrout unix socket server, to check whether there is another
# xfrout running.
- #self._log.log_message("error", "Failed to receive the file descriptor for XFR connection")
- #return
+ if fd == -2:
+ self._log.log_message("error", "Failed to receive the file descriptor for XFR connection")
break
data_len = self.request.recv(2)
Modified: branches/trac299/src/lib/xfr/fd_share.cc
==============================================================================
--- branches/trac299/src/lib/xfr/fd_share.cc (original)
+++ branches/trac299/src/lib/xfr/fd_share.cc Mon Sep 27 03:15:27 2010
@@ -88,12 +88,12 @@
msghdr.msg_controllen = cmsg_space(sizeof(int));
msghdr.msg_control = malloc(msghdr.msg_controllen);
if (msghdr.msg_control == NULL) {
- return (-1);
+ return (-2);
}
if (recvmsg(sock, &msghdr, 0) < 0) {
free(msghdr.msg_control);
- return (-1);
+ return (-2);
}
const struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msghdr);
int fd = -1;
More information about the bind10-changes
mailing list