Improve log message in tcpserver.
authorhyuna0213.jo <hyuna0213.jo@samsung.com>
Thu, 22 Sep 2016 01:56:19 +0000 (10:56 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Mon, 26 Sep 2016 13:12:45 +0000 (13:12 +0000)
Added logging to check the remote device address for connection.

Change-Id: Ia4ed72ba227ba5a2e2f06f8120f144301291cfe9
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12117
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
resource/csdk/connectivity/src/tcp_adapter/catcpserver.c

index e8110d7..effb5dd 100644 (file)
@@ -659,6 +659,11 @@ static CAResult_t CATCPConvertNameToAddr(int family, const char *host, uint16_t
 
 static int CATCPCreateSocket(int family, CATCPSessionInfo_t *svritem)
 {
+    VERIFY_NON_NULL_RET(svritem, TAG, "svritem", -1);
+
+    OIC_LOG_V(DEBUG, TAG, "try to connect with [%s:%u]",
+              svritem->sep.endpoint.addr, svritem->sep.endpoint.port);
+
     // #1. create tcp socket.
     int fd = socket(family, SOCK_STREAM, IPPROTO_TCP);
     if (-1 == fd)