Fixed 64 bit type format 32/194732/1 accepted/tizen/unified/20181212.062516 submit/tizen/20181211.125217
authorhyunuktak <hyunuk.tak@samsung.com>
Fri, 7 Dec 2018 05:38:31 +0000 (14:38 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Fri, 7 Dec 2018 05:38:34 +0000 (14:38 +0900)
Change-Id: I99d5a51acd5f2334872ad111ce5d640b2f911a22
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
include/stc.h
include/stc_rstn_internal.h
src/include/stc-info.h
src/include/stc-restriction.h
src/stc-firewall.c
src/stc-info.c
src/stc-pcap.c
src/stc-restriction.c
test/restriction.c
test/statistics.c

index 560a25a..7cd58c5 100755 (executable)
@@ -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.
index b166614..23fee23 100755 (executable)
@@ -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.
index 846e566..fbd9538 100755 (executable)
@@ -64,8 +64,8 @@ extern "C" {
 #define STC_STATS_INFO_PROCESS_STATE           "ground"
 
 typedef struct {
-       int64_t incoming_bytes; /** <incoming_bytes is the Total bytes =  Incoming + outgoing */
-       int64_t outgoing_bytes; /** Actual outgoing bytes */
+       long long int incoming_bytes;   /** <incoming_bytes is the Total bytes =  Incoming + outgoing */
+       long long int outgoing_bytes;   /** Actual outgoing bytes */
 } stc_data_counters_s;
 
 typedef struct {
index 2e9119f..617aee1 100755 (executable)
@@ -67,11 +67,11 @@ typedef struct {
        char subscriber_id[STC_SUBSCRIBER_ID_LEN];
        stc_iface_type_e iface_type;
        stc_restriction_type_e rstn_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_type;
 } stc_restriction_rule_s;
index 9d73f23..a704c74 100755 (executable)
@@ -384,7 +384,7 @@ static void __stc_fw_extract_chain(const char *key,
                return;
 
        if (!g_strcmp0(key, STC_FW_CHAIN_NAME)) {
-               guint str_length;
+               gsize str_length;
                const gchar *str = g_variant_get_string(value, &str_length);
                chain->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);
 
index 73285f3..affbe89 100755 (executable)
@@ -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);
 
index 17fd5d5..44556d8 100755 (executable)
@@ -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);
 
index e83cef3..3bf6fa2 100755 (executable)
@@ -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);
 
index 1682f34..2adca92 100755 (executable)
@@ -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;
index 73c7937..b568cec 100755 (executable)
@@ -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;