[icinga-checkins] icinga.org: icinga2/master: tcpsocket: fix fd on setsockopt SO_REUSEADDR

git at icinga.org git at icinga.org
Fri Jul 12 11:04:30 CEST 2013


Module: icinga2
Branch: master
Commit: a5d3b74da636693cad3e76ef87c3c3a2bc3e508a
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=a5d3b74da636693cad3e76ef87c3c3a2bc3e508a

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Fri Jul 12 11:03:36 2013 +0200

tcpsocket: fix fd on setsockopt SO_REUSEADDR

---

 lib/base/tcpsocket.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/base/tcpsocket.cpp b/lib/base/tcpsocket.cpp
index 63e2cef..66ab74d 100644
--- a/lib/base/tcpsocket.cpp
+++ b/lib/base/tcpsocket.cpp
@@ -80,7 +80,7 @@ void TcpSocket::Bind(const String& node, const String& service, int family)
 
 #ifndef _WIN32
 		const int optTrue = 1;
-		setsockopt(GetFD(), SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<const char *>(&optTrue), sizeof(optTrue));
+		setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<const char *>(&optTrue), sizeof(optTrue));
 #endif /* _WIN32 */
 
 		int rc = bind(fd, info->ai_addr, info->ai_addrlen);





More information about the icinga-checkins mailing list