summaryrefslogtreecommitdiff
path: root/src/libs/zeroconf/embed
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@nokia.com>2012-04-03 16:30:53 +0200
committerFawzi Mohamed <fawzi.mohamed@nokia.com>2012-04-03 17:26:11 +0200
commit154364bab7ced7653281c498a8d726a9f7c58f80 (patch)
tree479f1acaf3afe98567c49eea205f3174bd550f26 /src/libs/zeroconf/embed
parentfac8b1196595be0c94da7658eecab9129a9c53b2 (diff)
downloadqt-creator-154364bab7ced7653281c498a8d726a9f7c58f80.tar.gz
zeroconf: improve startup of mdnssd
give enough startup time, while still quickly bailing out when quitting Change-Id: I628621099e9ead4defc4613615ccb5e8303ff2df Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Diffstat (limited to 'src/libs/zeroconf/embed')
-rw-r--r--src/libs/zeroconf/embed/dnssd_clientstub.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libs/zeroconf/embed/dnssd_clientstub.c b/src/libs/zeroconf/embed/dnssd_clientstub.c
index 1f57a520ef..2129221468 100644
--- a/src/libs/zeroconf/embed/dnssd_clientstub.c
+++ b/src/libs/zeroconf/embed/dnssd_clientstub.c
@@ -35,7 +35,9 @@
#include "dnssd_ipc.h"
-namespace ZeroConf { namespace embeddedLib {
+namespace ZeroConf {
+extern int gQuickStop;
+namespace embeddedLib {
#include "../dns_sd_funct.h"
static int gDaemonErr = kDNSServiceErr_NoError;
}}
@@ -233,7 +235,7 @@ static int read_all(dnssd_sock_t sd, char *buf, int len)
int nVal=select(sd+1, &readFds, &writeFds, &exceptFds, &timeout);
if (nVal < 1 || !FD_ISSET(sd, &readFds)) {
++nErr;
- if (nErr < 6) // wait max 6s without reading
+ if (nErr < 100 && ! ZeroConf::gQuickStop) // wait max 100s without reading
continue;
} else {
num_read = recv(sd, buf, len, 0);