[svn] commit: r2008 - in /branches/trac183: configure.ac src/lib/cc/session.cc

BIND 10 source code commits bind10-changes at lists.isc.org
Mon May 31 19:29:15 UTC 2010


Author: jelte
Date: Mon May 31 19:29:15 2010
New Revision: 2008

Log:
rename HAVE_SIN_LEN macro to HAVE_SA_LEN, and use it for setting sun_len in the custom domain socket handler in lib/cc/session.cc
(removing the custom code altogether in favour of asio is under consideration)

Modified:
    branches/trac183/configure.ac
    branches/trac183/src/lib/cc/session.cc

Modified: branches/trac183/configure.ac
==============================================================================
--- branches/trac183/configure.ac (original)
+++ branches/trac183/configure.ac Mon May 31 19:29:15 2010
@@ -125,13 +125,15 @@
 AC_HEADER_STDBOOL
 AC_TYPE_SIZE_T
 
+
+
 AC_MSG_CHECKING(for sa_len in struct sockaddr)
 AC_TRY_COMPILE([
 #include <sys/types.h>
 #include <sys/socket.h>],
 [struct sockaddr sa; sa.sa_len = 0; return (0);],
         [AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_SIN_LEN, 1, Define to 1 if sockaddr_in has a sin_len member)],
+        AC_DEFINE(HAVE_SA_LEN, 1, [Define to 1 if sockaddr has a sa_len member, and corresponding sin_len and sun_len])],
         AC_MSG_RESULT(no))
 
 AC_ARG_WITH(lcov,

Modified: branches/trac183/src/lib/cc/session.cc
==============================================================================
--- branches/trac183/src/lib/cc/session.cc (original)
+++ branches/trac183/src/lib/cc/session.cc Mon May 31 19:29:15 2010
@@ -223,6 +223,9 @@
 void
 SocketSession::establish(const char& socket_file) {
     struct sockaddr_un sun;
+#ifdef HAVE_SA_LEN
+    sun.sun_len = sizeof(struct sockaddr_un);
+#endif
 
     if (strlen(&socket_file) >= sizeof(sun.sun_path)) {
         isc_throw(SessionError, "Unable to connect to message queue; "




More information about the bind10-changes mailing list