[CONPRO-1343] Removing unused code 12/194512/1
authorsourav bhuwalka <s.bhuwalka@samsung.com>
Tue, 20 Nov 2018 14:38:55 +0000 (20:08 +0530)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 5 Dec 2018 06:47:50 +0000 (15:47 +0900)
Here g_connectionHandler and g_adapterHandler are removed as they are always NULL and will never be called.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/340
(cherry picked from commit b5974992e15c5b95e6db4c8f3c905adc9d1560f9)

Change-Id: I656da132c3d3f948e0f84230d456476fca968f10
Signed-off-by: sourav bhuwalka <s.bhuwalka@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
resource/csdk/stack/src/ocstack.c [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index b6e30e6..adba4c5
@@ -151,9 +151,6 @@ static const char COAP_TCP_SCHEME[] = "coap+tcp:";
 static const char COAPS_TCP_SCHEME[] = "coaps+tcp:";
 static const char CORESPEC[] = "core";
 
-CAAdapterStateChangedCB g_adapterHandler = NULL;
-CAConnectionStateChangedCB g_connectionHandler = NULL;
-
 #if defined(__WITH_DTLS__) || defined (__WITH_TLS__)
 static OCOtmEventHandler_t g_otmEventHandler = {NULL, NULL};
 #endif
@@ -5500,19 +5497,14 @@ OCStackResult OCGetHeaderOption(OCHeaderOption* ocHdrOpt, size_t numOptions, uin
 void OCDefaultAdapterStateChangedHandler(CATransportAdapter_t adapter, bool enabled)
 {
     OIC_LOG(DEBUG, TAG, "OCDefaultAdapterStateChangedHandler");
-    if (g_adapterHandler)
-    {
-        g_adapterHandler(adapter, enabled);
-    }
+    
+    OC_UNUSED(adapter);
+    OC_UNUSED(enabled);
 }
 
 void OCDefaultConnectionStateChangedHandler(const CAEndpoint_t *info, bool isConnected)
 {
     OIC_LOG(DEBUG, TAG, "OCDefaultConnectionStateChangedHandler");
-    if (g_connectionHandler)
-    {
-       g_connectionHandler(info, isConnected);
-    }
 
     /*
      * If the client observes one or more resources over a reliable connection,