Modify to check roaming type 29/227129/1 tizen_5.0 submit/tizen_5.0/20200310.053053
authorhyunuk.tak <hyunuk.tak@samsung.com>
Tue, 10 Mar 2020 03:24:44 +0000 (12:24 +0900)
committerhyunuk.tak <hyunuk.tak@samsung.com>
Tue, 10 Mar 2020 03:24:46 +0000 (12:24 +0900)
Change-Id: I3a2f91a2aa6eaa7265c8e249b7ddc1adaabb9a47
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
src/stc-restriction.c
test/restriction.c

index be23980a38e3d0f2e89da200bc7d181e08699a4b..540ca8d79f85cf2f315f4195b2bdaa874a52382f 100755 (executable)
@@ -507,7 +507,7 @@ stc_error_e _stc_restriction_validate_rule(
                        restriction_rule->month_start_date);
        }
 
-       STC_RETURN_VAL_IF(restriction_rule->roaming_type > STC_ROAMING_ENABLED,
+       STC_RETURN_VAL_IF(restriction_rule->roaming_type > STC_ROAMING_DISABLED,
                STC_ERROR_INVALID_PARAMETER,
                "Roaming type is not valid [%s]",
                _stc_convert_roaming_to_string(restriction_rule->roaming_type));
@@ -564,7 +564,7 @@ stc_error_e _stc_restriction_check_set_rule(
                "Invalid month start date [%d]",
                restriction_rule->month_start_date);
 
-       STC_RETURN_VAL_IF(restriction_rule->roaming_type > STC_ROAMING_ENABLED,
+       STC_RETURN_VAL_IF(restriction_rule->roaming_type > STC_ROAMING_DISABLED,
                STC_ERROR_INVALID_PARAMETER,
                "Roaming type is not valid [%s]",
                _stc_convert_roaming_to_string(restriction_rule->roaming_type));
@@ -667,7 +667,7 @@ stc_error_e _stc_restriction_check_remove_rule(
                "Invalid rx limit [%"PRId64"] bytes",
                restriction_rule->data_warn_limit);
 
-       STC_RETURN_VAL_IF(restriction_rule->roaming_type > STC_ROAMING_ENABLED,
+       STC_RETURN_VAL_IF(restriction_rule->roaming_type > STC_ROAMING_DISABLED,
                STC_ERROR_INVALID_PARAMETER,
                "Roaming type is not valid [%d]",
                restriction_rule->roaming_type);
@@ -708,7 +708,7 @@ stc_error_e _stc_restriction_check_exclude_rule(
                "Invalid rx limit [%"PRId64"] bytes",
                restriction_rule->data_warn_limit);
 
-       STC_RETURN_VAL_IF(restriction_rule->roaming_type > STC_ROAMING_ENABLED,
+       STC_RETURN_VAL_IF(restriction_rule->roaming_type > STC_ROAMING_DISABLED,
                STC_ERROR_INVALID_PARAMETER,
                "Roaming type is not valid [%d]",
                restriction_rule->roaming_type);
index 6eca71852345481c7cc5e138548adc478cd23c44..94561fd3a17dc1bfbe88fbada50cfb623d089aff 100755 (executable)
@@ -217,7 +217,7 @@ static int __test_stc_set_restriction_rule(MManager *mm, struct menu_data *menu)
                return ret;
        }
 
-       if (roaming <= STC_ROAMING_ENABLED) {
+       if (roaming == STC_ROAMING_ENABLED || roaming == STC_ROAMING_DISABLED) {
                ret = stc_restriction_rule_set_roaming_type(g_restriction_rule, roaming);
                if (ret == STC_ERROR_NONE)
                        msg(LOG_GREEN "Success to set roaming type" LOG_END);