IOT-2351 CA: Parse all interfaces 37/20337/3
authorDan Mihai <Daniel.Mihai@microsoft.com>
Tue, 23 May 2017 20:49:32 +0000 (13:49 -0700)
committerUze Choi <uzchoi@samsung.com>
Wed, 24 May 2017 02:07:34 +0000 (02:07 +0000)
commit81df764e7ade13fdc74ecd7d50148a809291752c
tree827b52297db8f7a21bd8aeafe59353edc009f15f
parente8c13603daab0dc429f10abf030ca37d08a2021c
IOT-2351 CA: Parse all interfaces

The local variable interfaces gets decremented during the loop,
but the entire iflist has to be parsed.

Fixes new test errors that started on my machine with recent change
e3a3f65569f15fdf711c9d0a3123e6951f6499ba :

[ RUN      ] CATests.GetNetworkInformationTest
resource\csdk\connectivity\test\ca_api_unittest.cpp(517): error:
Value of: tempInfo[index].adapter != 0
  Actual: false
Expected: true
resource\csdk\connectivity\test\ca_api_unittest.cpp(518): error:
Value of: strlen(tempInfo[index].addr) != 0
  Actual: false
Expected: true
resource\csdk\connectivity\test\ca_api_unittest.cpp(517): error:
Value of: tempInfo[index].adapter != 0
  Actual: false
Expected: true
resource\csdk\connectivity\test\ca_api_unittest.cpp(518): error:
Value of: strlen(tempInfo[index].addr) != 0
  Actual: false
Expected: true
resource\csdk\connectivity\test\ca_api_unittest.cpp(517): error:
Value of: tempInfo[index].adapter != 0
  Actual: false
Expected: true
resource\csdk\connectivity\test\ca_api_unittest.cpp(518): error:
Value of: strlen(tempInfo[index].addr) != 0
  Actual: false
Expected: true
resource\csdk\connectivity\test\ca_api_unittest.cpp(517): error: Value of:
tempInfo[index].adapter != 0
  Actual: false
Expected: true
resource\csdk\connectivity\test\ca_api_unittest.cpp(518): error: Value of:
strlen(tempInfo[index].addr) != 0
  Actual: false
Expected: true
[  FAILED  ] CATests.GetNetworkInformationTest (5 ms)

Change-Id: If3a74a0739be6a53373f8b25436a50304029d751
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20337
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
resource/csdk/connectivity/src/ip_adapter/caipserver.c
resource/csdk/connectivity/src/tcp_adapter/catcpserver.c