Revert "Support secure network info in CAGetNetworkInformation"
authorZiran Sun <ziran.sun@samsung.com>
Wed, 12 Apr 2017 11:03:50 +0000 (11:03 +0000)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Wed, 12 Apr 2017 22:05:36 +0000 (22:05 +0000)
This reverts commit 5c93577b1ecdfe017ae51a7a3cc239245d300250.

Change-Id: Ic85a1e0a900143c449f60de1b8b3f984a2364ff7
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18815
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
resource/csdk/connectivity/src/tcp_adapter/catcpserver.c

index da65231..22d3b5d 100644 (file)
@@ -1314,11 +1314,6 @@ CAResult_t CAGetTCPInterfaceInformation(CAEndpoint_t **info, size_t *size)
     }
 
     size_t len = u_arraylist_length(iflist);
-    size_t length = len;
-
-#ifdef __WITH_TLS__
-    length = len * 2;
-#endif
 
     CAEndpoint_t *ep = (CAEndpoint_t *)OICCalloc(len, sizeof (CAEndpoint_t));
     if (!ep)
@@ -1354,25 +1349,6 @@ CAResult_t CAGetTCPInterfaceInformation(CAEndpoint_t **info, size_t *size)
             continue;
         }
         OICStrcpy(ep[j].addr, sizeof(ep[j].addr), ifitem->addr);
-
-#ifdef __WITH_TLS__
-        j++;
-
-        ep[j].adapter = CA_ADAPTER_TCP;
-        ep[j].ifindex = ifitem->index;
-
-        if (ifitem->family == AF_INET6)
-        {
-            ep[j].flags = CA_IPV6 | CA_SECURE;
-            ep[j].port = caglobals.tcp.ipv6s.port;
-        }
-        else
-        {
-            ep[j].flags = CA_IPV4 | CA_SECURE;
-            ep[j].port = caglobals.tcp.ipv4s.port;
-        }
-        OICStrcpy(ep[j].addr, sizeof(ep[j].addr), ifitem->addr);
-#endif
         j++;
     }