Disable auto-discovery of NSProvider over TCP.
[platform/upstream/iotivity.git] / service / notification / src / consumer / NSConsumerNetworkEventListener.c
index 21881b1..078b6a5 100644 (file)
@@ -84,6 +84,14 @@ void NSConnectionStateListener(const CAEndpoint_t * info, bool connected)
     NS_LOG_V(INFO_PRIVATE, "remote_address : %s:%d", info->addr, info->port);
     NS_LOG_V(DEBUG, "isConnect : %d", connected);
 
+#ifdef DISABLE_AUTO_TCP_NSPROVIDER_DISCOVERY
+    if (info->adapter == CA_ADAPTER_TCP)
+    {
+        NS_LOG(DEBUG, "Ignoring the TCP event.");
+        return;
+    }
+#endif
+
     NSTaskType type = TASK_EVENT_CONNECTED;
     OCDevAddr * addr = NULL;
     if (connected)