[svn] commit: r2010 - /trunk/src/lib/cc/session.cc

BIND 10 source code commits bind10-changes at lists.isc.org
Mon May 31 21:49:56 UTC 2010


Author: jelte
Date: Mon May 31 21:49:56 2010
New Revision: 2010

Log:
it would appear Solaris does not like variables called 'sun'
(addendum to previous commit which had an empty log message, it was the merge of branches/trac183, unix domain sockets for msgq)

Modified:
    trunk/src/lib/cc/session.cc

Modified: trunk/src/lib/cc/session.cc
==============================================================================
--- trunk/src/lib/cc/session.cc (original)
+++ trunk/src/lib/cc/session.cc Mon May 31 21:49:56 2010
@@ -219,24 +219,24 @@
 
 void
 SocketSession::establish(const char& socket_file) {
-    struct sockaddr_un sun;
+    struct sockaddr_un s_un;
 #ifdef HAVE_SA_LEN
-    sun.sun_len = sizeof(struct sockaddr_un);
+    s_un.sun_len = sizeof(struct sockaddr_un);
 #endif
 
-    if (strlen(&socket_file) >= sizeof(sun.sun_path)) {
+    if (strlen(&socket_file) >= sizeof(s_un.sun_path)) {
         isc_throw(SessionError, "Unable to connect to message queue; "
                   "socket file path too long: " << socket_file);
     }
-    sun.sun_family = AF_UNIX;
-    strncpy(sun.sun_path, &socket_file, sizeof(sun.sun_path) - 1);
+    s_un.sun_family = AF_UNIX;
+    strncpy(s_un.sun_path, &socket_file, sizeof(s_un.sun_path) - 1);
 
     int s = socket(AF_UNIX, SOCK_STREAM, 0);
     if (s < 0) {
         isc_throw(SessionError, "socket() failed");
     }
 
-    if (connect(s, (struct sockaddr *)&sun, sizeof(sun)) < 0) {
+    if (connect(s, (struct sockaddr *)&s_un, sizeof(s_un)) < 0) {
         close(s);
         isc_throw(SessionError, "Unable to connect to message queue");
     }




More information about the bind10-changes mailing list