[UTC][wifi][Non-ACR][Modify to check some feature sequence]
authorhyunuktak <hyunuk.tak@samsung.com>
Mon, 19 Dec 2016 06:13:16 +0000 (15:13 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Mon, 19 Dec 2016 06:13:20 +0000 (15:13 +0900)
Change-Id: I78e2a690aa492a3409a9320d44e56c58d2943645
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
src/utc/connection/utc-network-connection.c

index 7ecb5ec..045baaa 100755 (executable)
@@ -2153,16 +2153,9 @@ int utc_connection_open_profile_n(void)
  */
 int utc_connection_close_profile_p(void)
 {
+       int ret;
        connection_profile_h profile_h = NULL;
        connection_cellular_state_e state;
-       int ret = connection_get_cellular_state(connection, &state);
-       assert_eq(ret, CONNECTION_ERROR_NONE);
-       if (state == CONNECTION_CELLULAR_STATE_OUT_OF_SERVICE) {
-               fprintf(stderr, "Cellular state is out of service at %s:%d", __FILE__, __LINE__);
-               return 0;
-       }
-
-       ret = test_get_any_profile(&profile_h);
 
        if(!telephony_supported && !wifi_supported && !bt_tethering_supported){
                ret = connection_close_profile(connection, profile_temp, test_connection_closed_callback, NULL);
@@ -2170,6 +2163,17 @@ int utc_connection_close_profile_p(void)
                return 0;
        }
 
+       if (telephony_supported) {
+               ret = connection_get_cellular_state(connection, &state);
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+               if (state == CONNECTION_CELLULAR_STATE_OUT_OF_SERVICE) {
+                       fprintf(stderr, "Cellular state is out of service at %s:%d", __FILE__, __LINE__);
+                       return 0;
+               }
+       }
+
+       ret = test_get_any_profile(&profile_h);
+
        assert(profile_h);
        profile_temp = profile_h;
        ret = connection_close_profile(connection, profile_temp, test_connection_closed_callback, NULL);