From: hyunuktak Date: Fri, 7 Dec 2018 05:38:31 +0000 (+0900) Subject: Fixed 64 bit type format X-Git-Tag: submit/tizen/20181211.125217^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c073e12dadb990c0583301c7a3f3b64f022a7799;p=platform%2Fcore%2Fapi%2Fsmart-traffic-control.git Fixed 64 bit type format Change-Id: I99d5a51acd5f2334872ad111ce5d640b2f911a22 Signed-off-by: hyunuktak --- diff --git a/include/stc.h b/include/stc.h index 560a25a..7cd58c5 100755 --- a/include/stc.h +++ b/include/stc.h @@ -807,7 +807,7 @@ int stc_stats_info_get_iface_type(stc_stats_info_h info, * @see stc_stats_info_cb() */ int stc_stats_info_get_counter(stc_stats_info_h info, - int64_t *incoming, int64_t *outgoing); + long long int *incoming, long long int *outgoing); /** * @brief Gets the roaming type from statistics information. diff --git a/include/stc_rstn_internal.h b/include/stc_rstn_internal.h index b166614..23fee23 100755 --- a/include/stc_rstn_internal.h +++ b/include/stc_rstn_internal.h @@ -277,7 +277,7 @@ int stc_restriction_rule_set_type(stc_restriction_rule_h rule, * @see stc_restriction_rule_get_limit() */ int stc_restriction_rule_set_limit(stc_restriction_rule_h rule, - int64_t data_limit); + long long int data_limit); /** * @brief Sets the warning limit for restriction rule. @@ -304,7 +304,7 @@ int stc_restriction_rule_set_limit(stc_restriction_rule_h rule, * @see stc_restriction_rule_get_warning_limit() */ int stc_restriction_rule_set_warning_limit(stc_restriction_rule_h rule, - int64_t data_warn_limit); + long long int data_warn_limit); /** * @brief Sets the monthly data limit for restriction rule. @@ -331,7 +331,7 @@ int stc_restriction_rule_set_warning_limit(stc_restriction_rule_h rule, * @see stc_restriction_rule_get_monthly_limit() */ int stc_restriction_rule_set_monthly_limit(stc_restriction_rule_h rule, - int64_t limit); + long long int limit); /** * @brief Sets the weekly data limit for restriction rule. @@ -358,7 +358,7 @@ int stc_restriction_rule_set_monthly_limit(stc_restriction_rule_h rule, * @see stc_restriction_rule_get_weekly_limit() */ int stc_restriction_rule_set_weekly_limit(stc_restriction_rule_h rule, - int64_t limit); + long long int limit); /** * @brief Sets the daily data limit for restriction rule. @@ -385,7 +385,7 @@ int stc_restriction_rule_set_weekly_limit(stc_restriction_rule_h rule, * @see stc_restriction_rule_get_daily_limit() */ int stc_restriction_rule_set_daily_limit(stc_restriction_rule_h rule, - int64_t limit); + long long int limit); /** * @brief Sets the month start date for restriction rule. @@ -603,7 +603,7 @@ int stc_restriction_rule_get_type(stc_restriction_rule_h rule, * @see stc_restriction_rule_set_limit() */ int stc_restriction_rule_get_limit(stc_restriction_rule_h rule, - int64_t *data_limit); + long long int *data_limit); /** * @brief Gets the warning limit for restriction rule. @@ -630,7 +630,7 @@ int stc_restriction_rule_get_limit(stc_restriction_rule_h rule, * @see stc_restriction_rule_set_warning_limit() */ int stc_restriction_rule_get_warning_limit(stc_restriction_rule_h rule, - int64_t *data_warn_limit); + long long int *data_warn_limit); /** * @brief Gets the montlhy data limit for restriction rule. @@ -657,7 +657,7 @@ int stc_restriction_rule_get_warning_limit(stc_restriction_rule_h rule, * @see stc_restriction_rule_set_monthly_limit() */ int stc_restriction_rule_get_monthly_limit(stc_restriction_rule_h rule, - int64_t *limit); + long long int *limit); /** * @brief Gets the weekly data limit for restriction rule. @@ -684,7 +684,7 @@ int stc_restriction_rule_get_monthly_limit(stc_restriction_rule_h rule, * @see stc_restriction_rule_set_weekly_limit() */ int stc_restriction_rule_get_weekly_limit(stc_restriction_rule_h rule, - int64_t *limit); + long long int *limit); /** * @brief Gets the daily data limit for restriction rule. @@ -711,7 +711,7 @@ int stc_restriction_rule_get_weekly_limit(stc_restriction_rule_h rule, * @see stc_restriction_rule_set_daily_limit() */ int stc_restriction_rule_get_daily_limit(stc_restriction_rule_h rule, - int64_t *limit); + long long int *limit); /** * @brief Gets the month start date for restriction rule. diff --git a/src/include/stc-info.h b/src/include/stc-info.h index 846e566..fbd9538 100755 --- a/src/include/stc-info.h +++ b/src/include/stc-info.h @@ -64,8 +64,8 @@ extern "C" { #define STC_STATS_INFO_PROCESS_STATE "ground" typedef struct { - int64_t incoming_bytes; /** chain = g_strdup(str); @@ -407,7 +407,7 @@ static void __stc_fw_extract_rule(const char *key, return; if (!g_strcmp0(key, STC_FW_RULE_CHAIN)) { - guint str_length; + gsize str_length; const gchar *str = g_variant_get_string(value, &str_length); rule->chain = g_strdup(str); @@ -433,22 +433,22 @@ static void __stc_fw_extract_rule(const char *key, rule->family = g_variant_get_uint16(value); } else if (!g_strcmp0(key, STC_FW_RULE_SIP1)) { - guint str_length; + gsize str_length; const gchar *str = g_variant_get_string(value, &str_length); rule->s_ip1 = g_strdup(str); } else if (!g_strcmp0(key, STC_FW_RULE_SIP2)) { - guint str_length; + gsize str_length; const gchar *str = g_variant_get_string(value, &str_length); rule->s_ip2 = g_strdup(str); } else if (!g_strcmp0(key, STC_FW_RULE_DIP1)) { - guint str_length; + gsize str_length; const gchar *str = g_variant_get_string(value, &str_length); rule->d_ip1 = g_strdup(str); } else if (!g_strcmp0(key, STC_FW_RULE_DIP2)) { - guint str_length; + gsize str_length; const gchar *str = g_variant_get_string(value, &str_length); rule->d_ip2 = g_strdup(str); @@ -465,7 +465,7 @@ static void __stc_fw_extract_rule(const char *key, rule->d_port2 = g_variant_get_uint32(value); } else if (!g_strcmp0(key, STC_FW_RULE_IFNAME)) { - guint str_length; + gsize str_length; const gchar *str = g_variant_get_string(value, &str_length); rule->ifname = g_strdup(str); @@ -476,7 +476,7 @@ static void __stc_fw_extract_rule(const char *key, rule->log_level = g_variant_get_uint16(value); } else if (!g_strcmp0(key, STC_FW_RULE_LOG_PREFIX)) { - guint str_length; + gsize str_length; const gchar *str = g_variant_get_string(value, &str_length); rule->log_prefix = g_strdup(str); @@ -484,7 +484,7 @@ static void __stc_fw_extract_rule(const char *key, rule->nflog_group = g_variant_get_uint16(value); } else if (!g_strcmp0(key, STC_FW_RULE_NFLOG_PREFIX)) { - guint str_length; + gsize str_length; const gchar *str = g_variant_get_string(value, &str_length); rule->nflog_prefix = g_strdup(str); @@ -495,7 +495,7 @@ static void __stc_fw_extract_rule(const char *key, rule->nflog_threshold = g_variant_get_uint16(value); } else if (!g_strcmp0(key, STC_FW_RULE_IDENTIFIER)) { - guint str_length; + gsize str_length; const gchar *str = g_variant_get_string(value, &str_length); rule->identifier = g_strdup(str); diff --git a/src/stc-info.c b/src/stc-info.c index 73285f3..affbe89 100755 --- a/src/stc-info.c +++ b/src/stc-info.c @@ -171,7 +171,7 @@ EXPORT_API int stc_stats_info_get_iface_type(stc_stats_info_h info, } EXPORT_API int stc_stats_info_get_counter(stc_stats_info_h info, - int64_t *incoming, int64_t *outgoing) + long long int *incoming, long long int *outgoing) { CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_STC); diff --git a/src/stc-pcap.c b/src/stc-pcap.c index 17fd5d5..44556d8 100755 --- a/src/stc-pcap.c +++ b/src/stc-pcap.c @@ -173,7 +173,7 @@ static void __stc_pcap_extract(const char *key, return; if (!g_strcmp0(key, STC_PCAP_IFNAME)) { - guint str_length; + gsize str_length; const gchar *str = g_variant_get_string(value, &str_length); pcap->ifname = g_strdup(str); @@ -192,22 +192,22 @@ static void __stc_pcap_dev_extract(const char *key, return; if (!g_strcmp0(key, STC_PCAP_DEV_NAME)) { - guint str_length; + gsize str_length; const gchar *str = g_variant_get_string(value, &str_length); pcap->dev_name = g_strdup(str); } else if (!g_strcmp0(key, STC_PCAP_DEV_DECS)) { - guint str_length; + gsize str_length; const gchar *str = g_variant_get_string(value, &str_length); pcap->dev_decs = g_strdup(str); } else if (!g_strcmp0(key, STC_PCAP_DEV_NET)) { - guint str_length; + gsize str_length; const gchar *str = g_variant_get_string(value, &str_length); pcap->dev_net = g_strdup(str); } else if (!g_strcmp0(key, STC_PCAP_DEV_MASK)) { - guint str_length; + gsize str_length; const gchar *str = g_variant_get_string(value, &str_length); pcap->dev_mask = g_strdup(str); diff --git a/src/stc-restriction.c b/src/stc-restriction.c index e83cef3..3bf6fa2 100755 --- a/src/stc-restriction.c +++ b/src/stc-restriction.c @@ -980,7 +980,7 @@ EXPORT_API int stc_restriction_rule_set_type(stc_restriction_rule_h rule, } EXPORT_API int stc_restriction_rule_set_limit(stc_restriction_rule_h rule, - int64_t data_limit) + long long int data_limit) { CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_STC); @@ -1000,7 +1000,7 @@ EXPORT_API int stc_restriction_rule_set_limit(stc_restriction_rule_h rule, } EXPORT_API int stc_restriction_rule_set_warning_limit(stc_restriction_rule_h rule, - int64_t data_warn_limit) + long long int data_warn_limit) { CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_STC); @@ -1021,7 +1021,7 @@ EXPORT_API int stc_restriction_rule_set_warning_limit(stc_restriction_rule_h rul } EXPORT_API int stc_restriction_rule_set_monthly_limit(stc_restriction_rule_h rule, - int64_t limit) + long long int limit) { CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_STC); @@ -1042,7 +1042,7 @@ EXPORT_API int stc_restriction_rule_set_monthly_limit(stc_restriction_rule_h rul } EXPORT_API int stc_restriction_rule_set_weekly_limit(stc_restriction_rule_h rule, - int64_t limit) + long long int limit) { CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_STC); @@ -1063,7 +1063,7 @@ EXPORT_API int stc_restriction_rule_set_weekly_limit(stc_restriction_rule_h rule } EXPORT_API int stc_restriction_rule_set_daily_limit(stc_restriction_rule_h rule, - int64_t limit) + long long int limit) { CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_STC); @@ -1240,7 +1240,7 @@ EXPORT_API int stc_restriction_rule_get_type(stc_restriction_rule_h rule, } EXPORT_API int stc_restriction_rule_get_limit(stc_restriction_rule_h rule, - int64_t *data_limit) + long long int *data_limit) { CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_STC); @@ -1260,7 +1260,7 @@ EXPORT_API int stc_restriction_rule_get_limit(stc_restriction_rule_h rule, } EXPORT_API int stc_restriction_rule_get_warning_limit(stc_restriction_rule_h rule, - int64_t *data_warn_limit) + long long int *data_warn_limit) { CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_STC); @@ -1280,7 +1280,7 @@ EXPORT_API int stc_restriction_rule_get_warning_limit(stc_restriction_rule_h rul } EXPORT_API int stc_restriction_rule_get_monthly_limit(stc_restriction_rule_h rule, - int64_t *limit) + long long int *limit) { CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_STC); @@ -1300,7 +1300,7 @@ EXPORT_API int stc_restriction_rule_get_monthly_limit(stc_restriction_rule_h rul } EXPORT_API int stc_restriction_rule_get_weekly_limit(stc_restriction_rule_h rule, - int64_t *limit) + long long int *limit) { CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_STC); @@ -1320,7 +1320,7 @@ EXPORT_API int stc_restriction_rule_get_weekly_limit(stc_restriction_rule_h rule } EXPORT_API int stc_restriction_rule_get_daily_limit(stc_restriction_rule_h rule, - int64_t *limit) + long long int *limit) { CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_STC); diff --git a/test/restriction.c b/test/restriction.c index 1682f34..2adca92 100755 --- a/test/restriction.c +++ b/test/restriction.c @@ -73,11 +73,11 @@ static stc_callback_ret_e __test_stc_restriction_rule_cb( char *subscriber_id = NULL; stc_restriction_type_e rstn_type; stc_iface_type_e iface_type; - int64_t data_limit; - int64_t data_warn_limit; - int64_t monthly_limit; - int64_t weekly_limit; - int64_t daily_limit; + long long int data_limit; + long long int data_warn_limit; + long long int monthly_limit; + long long int weekly_limit; + long long int daily_limit; int month_start_date; stc_roaming_type_e roaming; @@ -176,11 +176,11 @@ static int __test_stc_set_restriction_rule(MManager *mm, struct menu_data *menu) { stc_iface_type_e iface_type = (int)strtol(g_iface_type, NULL, 10); stc_roaming_type_e roaming = (int)strtol(g_roaming, NULL, 10); - int64_t data_limit = (int64_t)strtol(g_data_limit, NULL, 10); - int64_t data_warn_limit = (int64_t)strtol(g_data_warn_limit, NULL, 10); - int64_t monthly_limit = (int64_t)strtol(g_monthly_limit, NULL, 10); - int64_t weekly_limit = (int64_t)strtol(g_weekly_limit, NULL, 10); - int64_t daily_limit = (int64_t)strtol(g_daily_limit, NULL, 10); + long long int data_limit = (long long int)strtol(g_data_limit, NULL, 10); + long long int data_warn_limit = (long long int)strtol(g_data_warn_limit, NULL, 10); + long long int monthly_limit = (long long int)strtol(g_monthly_limit, NULL, 10); + long long int weekly_limit = (long long int)strtol(g_weekly_limit, NULL, 10); + long long int daily_limit = (long long int)strtol(g_daily_limit, NULL, 10); int month_start_date = (int)strtol(g_month_start_date, NULL, 10); char *app_id = NULL; char *subscriber_id = NULL; diff --git a/test/statistics.c b/test/statistics.c index 73c7937..b568cec 100755 --- a/test/statistics.c +++ b/test/statistics.c @@ -81,8 +81,8 @@ static stc_callback_ret_e __test_stc_stats_info_cb( time_t from; time_t to; stc_iface_type_e iface_type; - int64_t incoming; - int64_t outgoing; + long long int incoming; + long long int outgoing; stc_roaming_type_e roaming; stc_protocol_type_e prototype; stc_process_state_e procstate;