diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-12-18 12:47:21 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-12-18 12:48:17 +0100 |
commit | 1f5401e6c9c260354022aeab6a02512bdbfa7a4b (patch) | |
tree | 754d07b8dc0a28b6e170e211c45ee49ca5beb2a8 /sd/source/ui/remotecontrol | |
parent | e5546342cb4e4f106257a7f7594d4356e6adbff3 (diff) |
DiscoveryService: -Werror=unused-but-set-variable
Change-Id: If0175642ebcbe1f4f6cc7640d87385c96e097180
Diffstat (limited to 'sd/source/ui/remotecontrol')
-rw-r--r-- | sd/source/ui/remotecontrol/DiscoveryService.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx index 9d8efa380aad..6b46aa0ec580 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() |