Revert "[CONPRO-1337] Disabled Presence Feature"
[platform/upstream/iotivity.git] / service / notification / src / consumer / NSConsumerDiscovery.c
index a408b6e..28c137e 100644 (file)
@@ -32,7 +32,6 @@
 #define NS_DISCOVER_QUERY "/oic/res?rt=x.org.iotivity.notification"
 #define NS_PRESENCE_SUBSCRIBE_QUERY_TCP "/oic/ad?rt=x.org.iotivity.notification"
 
-#ifdef WITH_PRESENCE
 OCStackApplicationResult NSConsumerPresenceListener(
         void * ctx, OCDoHandle handle, OCClientResponse * clientResponse)
 {
@@ -84,7 +83,6 @@ OCStackApplicationResult NSConsumerPresenceListener(
 
     return OC_STACK_KEEP_TRANSACTION;
 }
-#endif
 
 OCStackApplicationResult NSProviderDiscoverListener(
         void * ctx, OCDoHandle handle, OCClientResponse * clientResponse)
@@ -200,12 +198,11 @@ void NSConsumerHandleRequestDiscover(OCDevAddr * address, NSConsumerDiscoverType
         else if (address->adapter == OC_ADAPTER_TCP)
         {
             type = CT_ADAPTER_TCP;
-            NS_LOG(DEBUG, "Request discover [TCP]");
-#ifdef WITH_PRESENCE
+            NS_LOG(DEBUG, "Request discover and subscribe presence [TCP]");
             NS_LOG(DEBUG, "Subscribe presence [TCP]");
             NSInvokeRequest(NULL, OC_REST_PRESENCE, address, NS_PRESENCE_SUBSCRIBE_QUERY_TCP,
                     NULL, NSConsumerPresenceListener, NULL, NULL, type);
-#endif
+
             if (rType == NS_DISCOVER_CLOUD)
             {
                 callbackData = (void *) NS_DISCOVER_CLOUD;