int ret = connection_get_current_profile(connection, &profile_temp);
CHECK_RETURN("connection_profile_get_prefix_length", ret, CONNECTION_ERROR_NONE);
- connection_profile_get_prefix_length(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &length);
+ ret = connection_profile_get_prefix_length(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &length);
CHECK_RETURN("connection_profile_get_prefix_length", ret, CONNECTION_ERROR_NONE);
ret = connection_profile_get_prefix_length(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV6, &length);
CHECK_RETURN("connection_profile_get_prefix_length", ret, CONNECTION_ERROR_NONE);
ret = connection_remove_profile(connection, profile_temp);
CHECK_RETURN("connection_remove_profile", ret, CONNECTION_ERROR_NONE);
} else {
- ret = test_get_any_profile(&profile_h);
- assert(profile_h);
- profile_temp = profile_h;
-
- connection_profile_type_e type;
-
- ret = connection_profile_get_type(profile_temp, &type);
- CHECK_RETURN("connection_profile_get_type", ret, CONNECTION_ERROR_NONE);
-
- if (type == CONNECTION_PROFILE_TYPE_ETHERNET || type == CONNECTION_PROFILE_TYPE_BT) {
- ret = connection_remove_profile(connection, profile_temp);
- CHECK_RETURN("connection_remove_profile", ret, CONNECTION_ERROR_INVALID_PARAMETER);
- } else {
- ret = connection_remove_profile(connection, profile_temp);
- CHECK_RETURN("connection_remove_profile", ret, CONNECTION_ERROR_NONE);
- }
+ /**
+ * The purpose of this TC is to remove the added profile in the utc_connection_add_profile_p
+ * and this scenario only works with telephony profile.
+ */
+ connection_cellular_state_e state;
+ ret = connection_get_cellular_state(connection, &state);
+ CHECK_RETURN("connection_get_cellular_state", ret, CONNECTION_ERROR_NOT_SUPPORTED);
}
return 0;