Skip to content
Snippets Groups Projects
Commit 90a08ff4 authored by jpbl's avatar jpbl
Browse files

just littles changes

parent 20bbff2b
Branches
Tags
No related merge requests found
...@@ -39,12 +39,10 @@ DNSService::DNSService() ...@@ -39,12 +39,10 @@ DNSService::DNSService()
#endif #endif
// for the thread, the ifdef add a dynamic _regtypeList problem // for the thread, the ifdef add a dynamic _regtypeList problem
int iThread=0; // _queryThread index for the loop
for (std::list<std::string>::iterator iterThread=_regtypeList.begin(); for (std::list<std::string>::iterator iterThread=_regtypeList.begin();
iterThread!=_regtypeList.end(); iterThread!=_regtypeList.end();
iterThread++) { iterThread++) {
_queryThread.push_back(new DNSQueryThread(this, (*iterThread).c_str())); _queryThread.push_back(new DNSQueryThread(this, (*iterThread).c_str()));
iThread++;
} }
} }
...@@ -126,7 +124,14 @@ DNSService::queryService(const std::string &service) ...@@ -126,7 +124,14 @@ DNSService::queryService(const std::string &service)
DNSServiceRef myServRef=0; DNSServiceRef myServRef=0;
DNSServiceFlags resultFlags=0; DNSServiceFlags resultFlags=0;
theErr = DNSServiceQueryRecord(&myServRef, resultFlags, 0, service.c_str(), kDNSServiceType_TXT, kDNSServiceClass_IN, DNSServiceQueryRecordCallback, (void*)this); theErr = DNSServiceQueryRecord(&myServRef,
resultFlags,
0,
service.c_str(),
kDNSServiceType_TXT,
kDNSServiceClass_IN,
DNSServiceQueryRecordCallback,
(void*)this);
if (theErr == kDNSServiceErr_NoError) { if (theErr == kDNSServiceErr_NoError) {
DNSServiceProcessResult(myServRef); // blockage... DNSServiceProcessResult(myServRef); // blockage...
DNSServiceRefDeallocate(myServRef); DNSServiceRefDeallocate(myServRef);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment