]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Print buffer size passed to setsockopt()
authorMukund Sivaraman <muks@isc.org>
Thu, 23 Aug 2012 04:08:15 +0000 (09:38 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 23 Aug 2012 04:11:26 +0000 (09:41 +0530)
This will be useful in debugging the OpenBSD setsockopt() failures.

src/lib/util/io/socketsession.cc

index 4c509493d593f33892c0ae84104515f5e47346da..ba4e6c7f83d32cb89653cd399c851cd934bfc014 100644 (file)
@@ -163,7 +163,9 @@ SocketSessionForwarder::connectToReceiver() {
         if (setsockopt(impl_->fd_, SOL_SOCKET, SO_SNDBUF, &SOCKSESSION_BUFSIZE,
                        sizeof(SOCKSESSION_BUFSIZE)) == -1) {
             close();
-            isc_throw(SocketSessionError, "Failed to set send buffer size");
+            isc_throw(SocketSessionError,
+                      "Failed to set send buffer size to " <<
+                          SOCKSESSION_BUFSIZE);
         }
     }
     if (connect(impl_->fd_, convertSockAddr(&impl_->sock_un_),
@@ -286,7 +288,8 @@ struct SocketSessionReceiver::ReceiverImpl {
         if (setsockopt(fd_, SOL_SOCKET, SO_RCVBUF, &SOCKSESSION_BUFSIZE,
                        sizeof(SOCKSESSION_BUFSIZE)) == -1) {
             isc_throw(SocketSessionError,
-                      "Failed to set receive buffer size");
+                      "Failed to set receive buffer size to " <<
+                          SOCKSESSION_BUFSIZE);
         }
     }