From: hyunuk.tak Date: Tue, 10 Mar 2020 03:24:44 +0000 (+0900) Subject: Modify to check roaming type X-Git-Tag: submit/tizen_5.0/20200310.053053^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_5.0;p=platform%2Fcore%2Fapi%2Fsmart-traffic-control.git Modify to check roaming type Change-Id: I3a2f91a2aa6eaa7265c8e249b7ddc1adaabb9a47 Signed-off-by: hyunuk.tak --- diff --git a/src/stc-restriction.c b/src/stc-restriction.c index be23980..540ca8d 100755 --- a/src/stc-restriction.c +++ b/src/stc-restriction.c @@ -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); diff --git a/test/restriction.c b/test/restriction.c index 6eca718..94561fd 100755 --- a/test/restriction.c +++ b/test/restriction.c @@ -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);