From: hyunuk.tak Date: Tue, 10 Mar 2020 03:19:52 +0000 (+0900) Subject: Modify to check roaming type X-Git-Tag: submit/tizen_5.5/20200310.053132^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83908a1bd9df248ebfe5c745cb4753e29e143145;p=platform%2Fcore%2Fapi%2Fsmart-traffic-control.git Modify to check roaming type Change-Id: I40ab3648c4907d8af0a91d9aec8c3ec9ca781e67 Signed-off-by: hyunuk.tak --- diff --git a/src/internal/include/stc-dbus.h b/src/internal/include/stc-dbus.h index a9482a3..6efdb79 100755 --- a/src/internal/include/stc-dbus.h +++ b/src/internal/include/stc-dbus.h @@ -49,7 +49,7 @@ extern "C" { /***************************************************************************** * Macros and Typedefs *****************************************************************************/ -#define STC_DBUS_REPLY_TIMEOUT (120 * 1000) +#define STC_DBUS_REPLY_TIMEOUT (5 * 1000) #define STC_MANAGER_SERVICE "net.stc" #define STC_MANAGER_STATS_INTERFACE STC_MANAGER_SERVICE ".statistics" diff --git a/src/stc-restriction.c b/src/stc-restriction.c index 26686d3..a073c59 100755 --- a/src/stc-restriction.c +++ b/src/stc-restriction.c @@ -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); diff --git a/test/restriction.c b/test/restriction.c index 16f4e0f..7627c87 100755 --- a/test/restriction.c +++ b/test/restriction.c @@ -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);