[UTC][intelligent-network-monitoring][Non-ACR][Correct the way to check unsupported...
authorYu <jiung.yu@samsung.com>
Wed, 29 Aug 2018 05:41:30 +0000 (14:41 +0900)
committerJiung Yu <jiung.yu@samsung.com>
Wed, 29 Aug 2018 05:43:01 +0000 (05:43 +0000)
Change-Id: I2f6d889fdcb7b46cc6045223ea1b5cac744bdc23
Signed-off-by: Yu jiung <jiung.yu@samsung.com>
src/utc/intelligent-network-monitoring/utc-intelligent-network-monitoring.c

index ae3b33cebf1dd408a1ec40d515e683d89be5090c..6b9f1c408f21de5752e8b3d8cab7e3615a0e58d8 100755 (executable)
@@ -35,8 +35,10 @@ void utc_inm_startup(void)
 
        int ret = inm_initialize(&g_hInm);
        PRINT_RETURN("inm_initialize", ret);
-       if (ret != INM_ERROR_NONE)
+       if (ret != INM_ERROR_NONE) {
+               g_bFeatureAllNotSupported = !g_bFeatureInm;
                return;
+       }
 
        ret = inm_get_current_connection(g_hInm, &g_hConnection);
        if (ret != INM_ERROR_NONE)
@@ -2595,6 +2597,7 @@ int utc_inm_connection_get_prefix_length_p(void)
        if (g_bFeatureAllNotSupported) {
                int ret = inm_connection_get_prefix_length(profile_temp, INM_ADDRESS_FAMILY_IPV4, &length);
                CHECK_RETURN("inm_connection_get_prefix_length", ret, INM_ERROR_NOT_SUPPORTED);
+               return 0;
        }
 
        int ret = inm_get_current_connection(g_hInm, &profile_temp);
@@ -2621,6 +2624,7 @@ int utc_inm_connection_get_prefix_length_n(void)
        if (g_bFeatureAllNotSupported) {
                int ret = inm_connection_get_prefix_length(profile_inval, INM_ADDRESS_FAMILY_IPV4, &length);
                CHECK_RETURN("inm_connection_get_prefix_length", ret, INM_ERROR_NOT_SUPPORTED);
+               return 0;
        }
 
        inm_get_any_profile(&profile_any);