Prevent unexpected mdns termination 74/69074/1 accepted/tizen/common/20160512.143754 accepted/tizen/common/20160513.123326 accepted/tizen/ivi/20160513.004551 accepted/tizen/mobile/20160513.004238 accepted/tizen/tv/20160513.004538 accepted/tizen/wearable/20160513.004544 submit/tizen/20160511.111211 submit/tizen/20160512.075241
authorchleun.moon <chleun.moon@samsung.com>
Wed, 11 May 2016 10:25:51 +0000 (19:25 +0900)
committerchleun.moon <chleun.moon@samsung.com>
Wed, 11 May 2016 10:25:59 +0000 (19:25 +0900)
Change-Id: I7eefd94221d5a2e3d5c432c467ce6781d7a9d57a
Signed-off-by: cheoleun <chleun.moon@samsung.com>
packaging/capi-network-nsd.spec
src/dns-sd/dns-sd.c

index b937deb..85caaa2 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-network-nsd
 Summary:    A Network Service Discovery libraries in Native API
-Version:    0.0.2
+Version:    0.0.3
 Release:    1
 Group:      System/Network
 License:    Apache-2.0
index e9d9d6a..dd6b68a 100644 (file)
@@ -664,6 +664,9 @@ int dnssd_service_unset_record(dnssd_service_h local_service,
        dnssd_register_data_s *reg;
        DNSServiceRef sd_ref;
        DNSRecordRef record_client;
+       int dnssd_err = 0;
+       uint32_t version = 0;
+       uint32_t size = sizeof(version);
 
        CHECK_FEATURE_SUPPORTED(NETWORK_SERVICE_DISCOVERY_FEATURE);
 
@@ -696,6 +699,13 @@ int dnssd_service_unset_record(dnssd_service_h local_service,
                return DNSSD_ERROR_INVALID_PARAMETER;
        }
 
+       dnssd_err = DNSServiceGetProperty(kDNSServiceProperty_DaemonVersion, &version, &size);
+       if (!dnssd_err){
+               DNSSD_LOGD("Daemon is running ver. %d.%d", version / 10000, version / 100 % 100);
+       } else {
+               DNSSD_LOGE("Daemon is not running");
+       }
+
        ret = DNSServiceRemoveRecord(sd_ref, record_client,
                        local_handle->flags);
        if (ret < 0) {