[libdmapsharing] Set GError when DNSServiceBrowse fails
- From: W. Michael Petullo <wmpetullo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdmapsharing] Set GError when DNSServiceBrowse fails
- Date: Mon, 19 Oct 2015 03:18:20 +0000 (UTC)
commit 77cdb2422d53312f24eeeab419aff3e5f9377230
Author: W. Michael Petullo <mike flyn org>
Date: Sun Oct 18 21:33:21 2015 -0400
Set GError when DNSServiceBrowse fails
Signed-off-by: W. Michael Petullo <mike flyn org>
libdmapsharing/dmap-mdns-browser-dnssd.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/libdmapsharing/dmap-mdns-browser-dnssd.c b/libdmapsharing/dmap-mdns-browser-dnssd.c
index c3685f9..271c38f 100644
--- a/libdmapsharing/dmap-mdns-browser-dnssd.c
+++ b/libdmapsharing/dmap-mdns-browser-dnssd.c
@@ -411,17 +411,25 @@ dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error)
DNSServiceErrorType browse_err = kDNSServiceErr_Unknown;
- browse_err = DNSServiceBrowse (&(browser->priv->sd_browse_ref), 0,
- kDNSServiceInterfaceIndexAny,
- service_type_name[browser->priv->service_type], 0,
- (DNSServiceBrowseReply) dns_service_browse_reply,
- (void *) browser);
+ browse_err = DNSServiceBrowse (&(browser->priv->sd_browse_ref),
+ 0,
+ kDNSServiceInterfaceIndexAny,
+ service_type_name[browser->priv->service_type],
+ "",
+ (DNSServiceBrowseReply) dns_service_browse_reply,
+ (void *) browser);
if (kDNSServiceErr_NoError == browse_err) {
g_debug ("*** Browse Success ****");
is_success = TRUE;
add_browse_to_event_loop (browser);
+ } else {
+ g_debug ("Error starting mDNS discovery using DNS-SD");
+ g_set_error (error,
+ DMAP_MDNS_BROWSER_ERROR,
+ DMAP_MDNS_BROWSER_ERROR_FAILED,
+ "%s", "Unable to activate browser");
}
return is_success;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]