[Libreoffice-commits] .: sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Dec 18 03:50:07 PST 2012
sd/source/ui/remotecontrol/DiscoveryService.cxx | 12 ++++++++++++
1 file changed, 12 insertions(+)
New commits:
commit 1f5401e6c9c260354022aeab6a02512bdbfa7a4b
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Dec 18 12:47:21 2012 +0100
DiscoveryService: -Werror=unused-but-set-variable
Change-Id: If0175642ebcbe1f4f6cc7640d87385c96e097180
diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx
index 9d8efa3..6b46aa0 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.cxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx
@@ -49,6 +49,12 @@ DiscoveryService::DiscoveryService() :
rc = bind( mSocket, (sockaddr*) &aAddr, sizeof(sockaddr_in) );
+ if (rc)
+ {
+ SAL_WARN("sd", "DiscoveryService: bind failed: " << errno);
+ return; // would be better to throw, but unsure if caller handles that
+ }
+
struct ip_mreq multicastRequest;
multicastRequest.imr_multiaddr.s_addr = inet_addr( "239.0.0.1" );
@@ -59,6 +65,12 @@ DiscoveryService::DiscoveryService() :
(const char*)
#endif
&multicastRequest, sizeof(multicastRequest));
+
+ if (rc)
+ {
+ SAL_WARN("sd", "DiscoveryService: setsockopt failed: " << errno);
+ return; // would be better to throw, but unsure if caller handles that
+ }
}
DiscoveryService::~DiscoveryService()
More information about the Libreoffice-commits
mailing list