{
START_TEST;
+ inm_connection_state_e eConnectionState;
char *pszIpAddr = NULL;
int nRet = INM_ERROR_NONE;
inm_connection_h hProfile = NULL;
CHECK_HANDLE_CLEANUP(pszIpAddr, "inm_connection_get_ip_address", inm_connection_destroy(&hProfile));
FREE_MEMORY_TC(pszIpAddr);
- nRet = inm_connection_get_ip_address(hProfile, INM_ADDRESS_FAMILY_IPV6, &pszIpAddr);
- PRINT_RESULT_CLEANUP(nRet, INM_ERROR_NONE, "inm_connection_get_ip_address", InmGetError(nRet),inm_connection_destroy(&hProfile));
- CHECK_HANDLE_CLEANUP(pszIpAddr, "inm_connection_get_ip_address", inm_connection_destroy(&hProfile));
- FREE_MEMORY_TC(pszIpAddr);
+ nRet = inm_connection_get_ipv6_state(hProfile, &eConnectionState);
+ PRINT_RESULT_CLEANUP(nRet, INM_ERROR_NONE, "inm_connection_get_ipv6_state", InmGetError(nRet), inm_connection_destroy(&hProfile));
+ if (eConnectionState == INM_CONNECTION_STATE_CONNECTED) {
+ nRet = inm_connection_get_ip_address(hProfile, INM_ADDRESS_FAMILY_IPV6, &pszIpAddr);
+ PRINT_RESULT_CLEANUP(nRet, INM_ERROR_NONE, "inm_connection_get_ip_address", InmGetError(nRet),inm_connection_destroy(&hProfile));
+ CHECK_HANDLE_CLEANUP(pszIpAddr, "inm_connection_get_ip_address", inm_connection_destroy(&hProfile));
+ FREE_MEMORY_TC(pszIpAddr);
+ }
nRet = inm_connection_destroy(&hProfile);
PRINT_RESULT_NORETURN(nRet, INM_ERROR_NONE, "inm_connection_destroy", InmGetError(nRet));
{
START_TEST;
+ inm_connection_state_e eConnectionState;
char *pszIpAddr = NULL;
int nRet = INM_ERROR_NONE;
inm_connection_h hProfile = NULL;
PRINT_RESULT_CLEANUP(nRet, INM_ERROR_NONE, "inm_connection_get_gateway_address", InmGetError(nRet), inm_connection_destroy(&hProfile));
CHECK_HANDLE_CLEANUP(pszIpAddr, "inm_connection_get_gateway_address", inm_connection_destroy(&hProfile));
FREE_MEMORY_TC(pszIpAddr);
-
- nRet = inm_connection_get_gateway_address(hProfile, INM_ADDRESS_FAMILY_IPV6, &pszIpAddr);
- PRINT_RESULT_CLEANUP(nRet, INM_ERROR_NONE, "inm_connection_get_gateway_address", InmGetError(nRet), inm_connection_destroy(&hProfile));
- CHECK_HANDLE_CLEANUP(pszIpAddr, "inm_connection_get_gateway_address", inm_connection_destroy(&hProfile));
- FREE_MEMORY_TC(pszIpAddr);
+ nRet = inm_connection_get_ipv6_state(hProfile, &eConnectionState);
+ PRINT_RESULT_CLEANUP(nRet, INM_ERROR_NONE, "inm_connection_get_ipv6_state", InmGetError(nRet), inm_connection_destroy(&hProfile));
+ if (eConnectionState == INM_CONNECTION_STATE_CONNECTED) {
+ nRet = inm_connection_get_gateway_address(hProfile, INM_ADDRESS_FAMILY_IPV6, &pszIpAddr);
+ PRINT_RESULT_CLEANUP(nRet, INM_ERROR_NONE, "inm_connection_get_gateway_address", InmGetError(nRet), inm_connection_destroy(&hProfile));
+ CHECK_HANDLE_CLEANUP(pszIpAddr, "inm_connection_get_gateway_address", inm_connection_destroy(&hProfile));
+ FREE_MEMORY_TC(pszIpAddr);
+ }
nRet = inm_connection_destroy(&hProfile);
PRINT_RESULT_NORETURN(nRet, INM_ERROR_NONE, "inm_connection_destroy", InmGetError(nRet));