[IOT-2369] check the start flag when ip adapter is enabled
authorhyuna0213.jo <hyuna0213.jo@samsung.com>
Thu, 25 May 2017 12:34:37 +0000 (21:34 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Thu, 25 May 2017 17:31:45 +0000 (17:31 +0000)
Change-Id: I4fff403f809931b1bd2d4c49ea087b07d498333d
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20389
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Masud Bhuiyan <m.parves@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
resource/csdk/connectivity/src/ip_adapter/caipserver.c

index 670db818d572bfdbeff3f398b1b1dff906716706..fba7876d177759596b4f80c0f59dc6158ffb04e8 100644 (file)
@@ -1170,6 +1170,12 @@ static void applyMulticastToInterface6(uint32_t ifindex)
 
 CAResult_t CAIPStartListenServer()
 {
+    if (caglobals.ip.started)
+    {
+        OIC_LOG(DEBUG, TAG, "Adapter is started already");
+        return CA_STATUS_OK;
+    }
+
     OIC_LOG_V(DEBUG, TAG, "IN %s", __func__);
     u_arraylist_t *iflist = CAIPGetInterfaceInformation(0);
     if (!iflist)