Modify to check roaming type 25/227125/1 accepted/tizen/unified/20200311.130917 submit/tizen/20200310.053121
authorhyunuk.tak <hyunuk.tak@samsung.com>
Tue, 10 Mar 2020 03:18:44 +0000 (12:18 +0900)
committerhyunuk.tak <hyunuk.tak@samsung.com>
Tue, 10 Mar 2020 03:18:46 +0000 (12:18 +0900)
Change-Id: Ie2b7e7842f6956cc0db90e82df393bb2887fd74c
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
src/stc-restriction.c
test/restriction.c

index 26686d3f9c7f59fa382bdafea16cd54e82dedaa5..a073c592d08083edad333aa83fd9e0af63a86306 100755 (executable)
@@ -718,7 +718,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));
@@ -775,7 +775,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));
@@ -878,7 +878,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);
@@ -919,7 +919,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 16f4e0fbda944d5d1138eaee6fa0febc3484a5d7..7627c87efcfd627b91304e5e1392e8a4afc7d6e4 100755 (executable)
@@ -256,7 +256,7 @@ static int __test_stc_set_restriction_rule_thread(gpointer data)
                return ret;
        }
 
-       if (roaming <= STC_ROAMING_ENABLED) {
+       if (roaming == STC_ROAMING_ENABLED || roaming == STC_ROAMING_DISABLED) {
                THREAD_IN;
                ret = stc_restriction_rule_set_roaming_type(g_restriction_rule_h, roaming);
                THREAD_OUT;
@@ -800,7 +800,7 @@ static int __test_stc_restriction_list_add_rule(MManager *mm, struct menu_data *
                return ret;
        }
 
-       if (roaming <= STC_ROAMING_ENABLED) {
+       if (roaming == STC_ROAMING_ENABLED || roaming == STC_ROAMING_DISABLED) {
                ret = stc_restriction_rule_set_roaming_type(rule_h, roaming);
                if (ret == STC_ERROR_NONE)
                        msg(LOG_GREEN "Success to set roaming type" LOG_END);