summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-27 22:40:23 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-28 14:00:07 +0100
commit77838efb0748689ee77007a92d9a01e03e6dbdb7 (patch)
tree6efde62810259513a859060654f60c64ae996fd6 /sd
parent1eb80742966388b2c209183f951f2924dcd12a26 (diff)
Use proper return type for DNSServiceRefSockFD
...which is e.g. unsigned long long for Windows 64-bit (and declaring the function in dns_sd.h is not necessary, and the dnssd_sock_t typedef is not known there) Change-Id: Iaa0eb03a83b76200204ba905313bcc27b5007b39
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/remotecontrol/mDNSResponder/dns_sd.h27
-rw-r--r--sd/source/ui/remotecontrol/mDNSResponder/dnssd_clientstub.c6
2 files changed, 3 insertions, 30 deletions
diff --git a/sd/source/ui/remotecontrol/mDNSResponder/dns_sd.h b/sd/source/ui/remotecontrol/mDNSResponder/dns_sd.h
index 31daaeb91caf..faaa7416f7b3 100644
--- a/sd/source/ui/remotecontrol/mDNSResponder/dns_sd.h
+++ b/sd/source/ui/remotecontrol/mDNSResponder/dns_sd.h
@@ -741,33 +741,6 @@ DNSServiceErrorType DNSSD_API DNSServiceGetProperty
*
*********************************************************************************************/
-/* DNSServiceRefSockFD()
- *
- * Access underlying Unix domain socket for an initialized DNSServiceRef.
- * The DNS Service Discovery implementation uses this socket to communicate between the client and
- * the mDNSResponder daemon. The application MUST NOT directly read from or write to this socket.
- * Access to the socket is provided so that it can be used as a kqueue event source, a CFRunLoop
- * event source, in a select() loop, etc. When the underlying event management subsystem (kqueue/
- * select/CFRunLoop etc.) indicates to the client that data is available for reading on the
- * socket, the client should call DNSServiceProcessResult(), which will extract the daemon's
- * reply from the socket, and pass it to the appropriate application callback. By using a run
- * loop or select(), results from the daemon can be processed asynchronously. Alternatively,
- * a client can choose to fork a thread and have it loop calling "DNSServiceProcessResult(ref);"
- * If DNSServiceProcessResult() is called when no data is available for reading on the socket, it
- * will block until data does become available, and then process the data and return to the caller.
- * When data arrives on the socket, the client is responsible for calling DNSServiceProcessResult(ref)
- * in a timely fashion -- if the client allows a large backlog of data to build up the daemon
- * may terminate the connection.
- *
- * sdRef: A DNSServiceRef initialized by any of the DNSService calls.
- *
- * return value: The DNSServiceRef's underlying socket descriptor, or -1 on
- * error.
- */
-
-int DNSSD_API DNSServiceRefSockFD(DNSServiceRef sdRef);
-
-
/* DNSServiceProcessResult()
*
* Read a reply from the daemon, calling the appropriate application callback. This call will
diff --git a/sd/source/ui/remotecontrol/mDNSResponder/dnssd_clientstub.c b/sd/source/ui/remotecontrol/mDNSResponder/dnssd_clientstub.c
index c38197c97143..c6b50a2cd34e 100644
--- a/sd/source/ui/remotecontrol/mDNSResponder/dnssd_clientstub.c
+++ b/sd/source/ui/remotecontrol/mDNSResponder/dnssd_clientstub.c
@@ -799,7 +799,7 @@ cleanup:
return err;
}
-int DNSSD_API DNSServiceRefSockFD(DNSServiceRef sdRef)
+dnssd_sock_t DNSSD_API DNSServiceRefSockFD(DNSServiceRef sdRef)
{
if (!sdRef) { syslog(LOG_WARNING, "dnssd_clientstub DNSServiceRefSockFD called with NULL DNSServiceRef"); return dnssd_InvalidSocket; }
@@ -816,7 +816,7 @@ int DNSSD_API DNSServiceRefSockFD(DNSServiceRef sdRef)
return dnssd_InvalidSocket;
}
- return (int) sdRef->sockfd;
+ return sdRef->sockfd;
}
#if _DNS_SD_LIBDISPATCH
@@ -2025,7 +2025,7 @@ DNSServiceErrorType DNSSD_API DNSServiceSetDispatchQueue
dispatch_queue_t queue
)
{
- int dnssd_fd = DNSServiceRefSockFD(service);
+ dnssd_sock_t dnssd_fd = DNSServiceRefSockFD(service);
if (dnssd_fd == dnssd_InvalidSocket) return kDNSServiceErr_BadParam;
if (!queue)
{