Fixed 64 bit type format 50/195050/1 accepted/tizen/unified/20181212.062514 submit/tizen/20181211.125217
authorhyunuktak <hyunuk.tak@samsung.com>
Mon, 10 Dec 2018 07:16:41 +0000 (16:16 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Mon, 10 Dec 2018 07:16:43 +0000 (16:16 +0900)
Change-Id: I6d94f5b508b6a79f22d4a81d51fd1ab0830989dc
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
21 files changed:
include/stc-manager.h
include/stc-restriction.h
packaging/stc-manager.spec
plugin/firewall/include/stc-plugin-firewall.h
plugin/firewall/stc-plugin-firewall.c
plugin/monitor/include/stc-plugin-monitor-context.h
plugin/monitor/include/stc-plugin-monitor-rstn.h
plugin/monitor/stc-plugin-monitor-rstn.c
plugin/monitor/stc-plugin-monitor.c
src/database/include/db-internal.h [changed mode: 0644->0755]
src/database/include/stc-db.h [changed mode: 0644->0755]
src/database/include/table-counters.h [changed mode: 0644->0755]
src/database/include/table-firewall.h [changed mode: 0644->0755]
src/database/include/table-restrictions.h [changed mode: 0644->0755]
src/database/include/table-statistics.h [changed mode: 0644->0755]
src/database/tables/table-counters.c
src/database/tables/table-statistics.c
src/helper/helper-nfacct-rule.c
src/helper/helper-nfacct-rule.h [changed mode: 0644->0755]
src/stc-pcap.c
src/stc-restriction.c

index 0b930eb..82d8747 100755 (executable)
@@ -230,8 +230,8 @@ typedef struct {
  * @brief datausage in bytes
  */
 typedef struct {
-       int64_t in_bytes;  /**< incoming bytes */
-       int64_t out_bytes;  /**< outgoing bytes */
+       long long int in_bytes;  /**< incoming bytes */
+       long long int out_bytes;  /**< outgoing bytes */
 } stc_data_counter_s;
 
 typedef struct {
index 9f5560a..fe25ea2 100755 (executable)
 typedef struct {
        stc_app_state_e rs_type;
        stc_iface_type_e iftype;
-       int64_t send_limit;
-       int64_t rcv_limit;
-       int64_t snd_warning_limit;
-       int64_t rcv_warning_limit;
+       long long int send_limit;
+       long long int rcv_limit;
+       long long int snd_warning_limit;
+       long long int rcv_warning_limit;
        stc_roaming_type_e roaming;
        char *ifname;
        char *subscriber_id;
index d8dc5c4..eeb10ef 100644 (file)
@@ -1,6 +1,6 @@
 Name:       stc-manager
 Summary:    STC(Smart Traffic Control) manager
-Version:    0.0.84
+Version:    0.0.85
 Release:    0
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
index bf36d58..d9f9dc4 100755 (executable)
@@ -32,7 +32,7 @@
 
 typedef struct {
        stc_fw_chain_target_e target;
-       uint64_t priority;
+       long long int priority;
        GSList *rules;
 } stc_fw_data_s;
 
index 3e5fdd6..2b13d62 100755 (executable)
@@ -934,7 +934,7 @@ static void __fw_rule_extract(const char *key, GVariant *value,
        }
 
        if (g_strcmp0(key, RULE_CHAIN) == 0) {
-               guint str_length;
+               gsize str_length;
                const gchar *str = g_variant_get_string(value, &str_length);
                rule->chain = g_strdup(str);
                STC_LOGD("%s: [%s]", RULE_CHAIN, rule->chain);
@@ -969,7 +969,7 @@ static void __fw_rule_extract(const char *key, GVariant *value,
 
        } else if (g_strcmp0(key, RULE_SIP1) == 0) {
                if (rule->s_ip_type != STC_FW_IP_NONE) {
-                       guint str_length;
+                       gsize str_length;
                        const gchar *str = g_variant_get_string(value, &str_length);
                        if (rule->family == STC_FW_FAMILY_V4) {
                                inet_pton(AF_INET, str, &(rule->s_ip1.Ipv4));
@@ -984,7 +984,7 @@ static void __fw_rule_extract(const char *key, GVariant *value,
 
        } else if (g_strcmp0(key, RULE_SIP2) == 0) {
                if (rule->s_ip_type != STC_FW_IP_NONE) {
-                       guint str_length;
+                       gsize str_length;
                        const gchar *str = g_variant_get_string(value, &str_length);
                        if (rule->family == STC_FW_FAMILY_V4) {
                                inet_pton(AF_INET, str, &(rule->s_ip2.Ipv4));
@@ -999,7 +999,7 @@ static void __fw_rule_extract(const char *key, GVariant *value,
 
        } else if (g_strcmp0(key, RULE_DIP1) == 0) {
                if (rule->d_ip_type != STC_FW_IP_NONE) {
-                       guint str_length;
+                       gsize str_length;
                        const gchar *str = g_variant_get_string(value, &str_length);
                        if (rule->family == STC_FW_FAMILY_V4) {
                                inet_pton(AF_INET, str, &(rule->d_ip1.Ipv4));
@@ -1014,7 +1014,7 @@ static void __fw_rule_extract(const char *key, GVariant *value,
 
        } else if (g_strcmp0(key, RULE_DIP2) == 0) {
                if (rule->d_ip_type != STC_FW_IP_NONE) {
-                       guint str_length;
+                       gsize str_length;
                        const gchar *str = g_variant_get_string(value, &str_length);
                        if (rule->family == STC_FW_FAMILY_V4) {
                                inet_pton(AF_INET, str, &(rule->d_ip2.Ipv4));
@@ -1053,7 +1053,7 @@ static void __fw_rule_extract(const char *key, GVariant *value,
 
        } else if (g_strcmp0(key, RULE_IFNAME) == 0) {
                if (rule->direction != STC_FW_DIRECTION_NONE) {
-                       guint str_length;
+                       gsize str_length;
                        const gchar *str = g_variant_get_string(value, &str_length);
                        rule->ifname = g_strdup(str);
                        STC_LOGD("%s: [%s]", RULE_IFNAME, rule->ifname);
@@ -1071,7 +1071,7 @@ static void __fw_rule_extract(const char *key, GVariant *value,
 
        } else if (g_strcmp0(key, RULE_LOG_PREFIX) == 0) {
                if (rule->target == STC_FW_RULE_TARGET_LOG) {
-                       guint str_length;
+                       gsize str_length;
                        const gchar *str = g_variant_get_string(value, &str_length);
                        rule->log_prefix = g_strdup(str);
                        STC_LOGD("%s: [%s]", RULE_LOG_PREFIX, rule->log_prefix);
@@ -1085,7 +1085,7 @@ static void __fw_rule_extract(const char *key, GVariant *value,
 
        } else if (g_strcmp0(key, RULE_NFLOG_PREFIX) == 0) {
                if (rule->target == STC_FW_RULE_TARGET_NFLOG) {
-                       guint str_length;
+                       gsize str_length;
                        const gchar *str = g_variant_get_string(value, &str_length);
                        rule->nflog_prefix = g_strdup(str);
                        STC_LOGD("%s: [%s]", RULE_NFLOG_PREFIX, rule->nflog_prefix);
@@ -1104,7 +1104,7 @@ static void __fw_rule_extract(const char *key, GVariant *value,
                }
 
        } else if (g_strcmp0(key, RULE_IDENTIFIER) == 0) {
-               guint str_length;
+               gsize str_length;
                const gchar *str = g_variant_get_string(value, &str_length);
                rule->identifier = g_strdup(str);
                STC_LOGD("%s: [%s]", RULE_IDENTIFIER, rule->identifier);
index b0d0075..3e8f324 100755 (executable)
@@ -29,7 +29,7 @@ typedef struct {
 
 typedef struct {
        struct nfacct_rule *counter;
-       int64_t bytes;
+       long long int bytes;
        gboolean data_limit_exceeded;
 } classid_bytes_context_s;
 
index 0c690c7..41b1e80 100755 (executable)
@@ -55,12 +55,12 @@ typedef struct {
        stc_roaming_type_e roaming;
        char *mac;
 
-       uint64_t restriction_id;
+       long long int restriction_id;
        stc_rstn_state_e rstn_state;
        stc_rstn_type_e rstn_type;
 
-       int64_t counter[STC_RSTN_LIMIT_TYPE_MAX];
-       int64_t limit[STC_RSTN_LIMIT_TYPE_MAX];
+       long long int counter[STC_RSTN_LIMIT_TYPE_MAX];
+       long long int limit[STC_RSTN_LIMIT_TYPE_MAX];
        int32_t limit_exceeded;
        int32_t limit_notified;
 
@@ -76,9 +76,9 @@ typedef struct {
        time_t month_start_ts;
        time_t week_start_ts;
        time_t day_start_ts;
-       int64_t monthly_stat;
-       int64_t weekly_stat;
-       int64_t daily_stat;
+       long long int monthly_stat;
+       long long int weekly_stat;
+       long long int daily_stat;
 } stc_rstn_cumulative_data_s;
 
 
index 75bc4e5..99951a2 100755 (executable)
@@ -88,7 +88,7 @@ static stc_cb_ret_e __statistics_info_cb(const table_statistics_info *info,
                                        void *user_data)
 {
        stc_rstn_cumulative_data_s *stat = (stc_rstn_cumulative_data_s *)user_data;
-       int64_t counters = 0;
+       long long int counters = 0;
 
        counters = info->cnt.in_bytes + info->cnt.out_bytes;
 
@@ -101,7 +101,7 @@ static stc_cb_ret_e __statistics_info_cb(const table_statistics_info *info,
        return STC_CONTINUE;
 }
 
-static void __rstn_add_tether_rule(int64_t classid, gchar *mac,
+static void __rstn_add_tether_rule(long long int classid, gchar *mac,
                nfacct_rule_intend intend, stc_iface_type_e iftype)
 {
        GSList *conn_list = stc_get_connection_list();
@@ -149,7 +149,7 @@ static void __rstn_add_tether_rule(int64_t classid, gchar *mac,
        }
 }
 
-static void __rstn_del_tether_rule(int64_t classid, gchar *mac,
+static void __rstn_del_tether_rule(long long int classid, gchar *mac,
                nfacct_rule_intend intend, stc_iface_type_e iftype)
 {
        GSList *conn_list = stc_get_connection_list();
@@ -199,7 +199,7 @@ static void __rstn_del_tether_rule(int64_t classid, gchar *mac,
        }
 }
 
-static void __rstn_add_ipt_rule(int64_t classid, nfacct_rule_intend intend,
+static void __rstn_add_ipt_rule(long long int classid, nfacct_rule_intend intend,
                                stc_iface_type_e iftype)
 {
        GSList *conn_list = stc_get_connection_list();
@@ -248,7 +248,7 @@ static void __rstn_add_ipt_rule(int64_t classid, nfacct_rule_intend intend,
        }
 }
 
-static void __rstn_del_ipt_rule(int64_t classid, nfacct_rule_intend intend,
+static void __rstn_del_ipt_rule(long long int classid, nfacct_rule_intend intend,
                                stc_iface_type_e iftype)
 {
        GSList *conn_list = stc_get_connection_list();
@@ -367,7 +367,7 @@ static void __rstn_tethering_process(enum traffic_restriction_type rstn_type,
        {
                int i;
                table_counters_info info;
-               int64_t effective_limit[STC_RSTN_LIMIT_TYPE_MAX] = { 0, };
+               long long int effective_limit[STC_RSTN_LIMIT_TYPE_MAX] = { 0, };
 
                        memset(&info, 0, sizeof(table_counters_info));
                        rstn_data->limit_exceeded = 0;
@@ -514,7 +514,7 @@ static void __rstn_process(enum traffic_restriction_type rstn_type,
        {
                int i;
                table_counters_info info;
-               int64_t effective_limit[STC_RSTN_LIMIT_TYPE_MAX] = { 0, };
+               long long int effective_limit[STC_RSTN_LIMIT_TYPE_MAX] = { 0, };
 
                memset(&info, 0, sizeof(table_counters_info));
                rstn_data->limit_exceeded = 0;
@@ -593,7 +593,7 @@ static void __rstn_process(enum traffic_restriction_type rstn_type,
 
                if (STC_DEBUG_LOG && STC_RSTN_LOG) {
                        STC_LOGD("Restriction activated "
-                               "[\033[1;36m%d\033[0;m:\033[1;35m%d\033[0;m]",
+                               "[\033[1;36m%d\033[0;m:\033[1;35m%lld\033[0;m]",
                                rstn_data->classid, rstn_data->restriction_id);
                }
        }
@@ -608,7 +608,7 @@ static void __rstn_process(enum traffic_restriction_type rstn_type,
 
                if (STC_DEBUG_LOG && STC_RSTN_LOG) {
                        STC_LOGD("Restriction activated "
-                               "[\033[1;36m%d\033[0;m:\033[1;35m%d\033[0;m]",
+                               "[\033[1;36m%d\033[0;m:\033[1;35m%lld\033[0;m]",
                                rstn_data->classid, rstn_data->restriction_id);
                }
                break;
@@ -635,7 +635,7 @@ static void __rstn_process(enum traffic_restriction_type rstn_type,
 
                if (STC_DEBUG_LOG && STC_RSTN_LOG) {
                        STC_LOGD("Restriction deactivated "
-                               "[\033[1;36m%d\033[0;m:\033[1;35m%d\033[0;m]",
+                               "[\033[1;36m%d\033[0;m:\033[1;35m%lld\033[0;m]",
                                rstn_data->classid, rstn_data->restriction_id);
                }
        }
@@ -653,7 +653,7 @@ static void __rstn_add(gpointer data, gpointer user_data)
        if (rstn_data->rstn_state == STC_RSTN_STATE_ACTIVATED) {
                if (STC_DEBUG_LOG && STC_RSTN_LOG) {
                        STC_LOGD("Restriction already activated "
-                               "[\033[1;36m%d\033[0;m:\033[1;35m%d\033[0;m]",
+                               "[\033[1;36m%d\033[0;m:\033[1;35m%lld\033[0;m]",
                                rstn_data->classid, rstn_data->restriction_id);
                }
                return;
@@ -674,7 +674,7 @@ static void __rstn_add(gpointer data, gpointer user_data)
        if (STC_DEBUG_LOG && STC_RSTN_LOG) {
                __print_rstn(rstn_data);
                STC_LOGD("\033[1;32mRestriction added\033[0;m "
-                       "[\033[1;36m%d\033[0;m:\033[1;35m%d\033[0;m]",
+                       "[\033[1;36m%d\033[0;m:\033[1;35m%lld\033[0;m]",
                        rstn_data->classid, rstn_data->restriction_id);
        }
 }
@@ -693,7 +693,7 @@ static void __rstn_remove(gpointer data, gpointer user_data)
 
        if (rstn_data->rstn_state == STC_RSTN_STATE_DEACTIVATED) {
                STC_LOGD("\033[1;31mRestriction already deactivated\033[0;m "
-                       "[\033[1;36m%d\033[0;m:\033[1;35m%d\033[0;m]",
+                       "[\033[1;36m%d\033[0;m:\033[1;35m%lld\033[0;m]",
                        rstn_data->classid, rstn_data->restriction_id);
                return;
        }
@@ -706,7 +706,7 @@ static void __rstn_remove(gpointer data, gpointer user_data)
        if (STC_DEBUG_LOG && STC_RSTN_LOG) {
                __print_rstn(rstn_data);
                STC_LOGD("\033[1;31mRestriction removed\033[0;m "
-                       "[\033[1;36m%d\033[0;m:\033[1;35m%d\033[0;m]",
+                       "[\033[1;36m%d\033[0;m:\033[1;35m%lld\033[0;m]",
                        rstn_data->classid, rstn_data->restriction_id);
        }
 }
index 117036e..fc71c8c 100755 (executable)
@@ -112,7 +112,7 @@ static void __check_rstn_limit_exceeded(gpointer data,
                *limit_exceeded = rstn_data->limit_exceeded;
 }
 
-static void __fill_nfacct_result(char *cnt_name, int64_t bytes,
+static void __fill_nfacct_result(char *cnt_name, long long int bytes,
                                struct counter_arg *carg)
 {
        stc_monitor_rstn_reset_time_counters_if_required();
@@ -198,8 +198,8 @@ static int __fill_counters(struct rtattr *attr_list[__NFACCT_MAX],
                 populate_counters(cnt_name, carg);
                 */
        } else {
-               int64_t *bytes_p =
-                       (int64_t *)RTA_DATA(attr_list[NFACCT_BYTES]);
+               long long int *bytes_p =
+                       (long long int *)RTA_DATA(attr_list[NFACCT_BYTES]);
                int bytes = be64toh(*bytes_p);
                if (bytes) {
                        ++carg->serialized_counters;
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 13ae916..c15d3fa
@@ -48,8 +48,8 @@ typedef struct {
  */
 typedef struct {
        char *app_id;
-       int64_t rcv_count;
-       int64_t snd_count;
+       long long int rcv_count;
+       long long int snd_count;
 
 #ifndef CONFIG_DATAUSAGE_NFACCT
        pid_t pid;
old mode 100644 (file)
new mode 100755 (executable)
index 5faff83..41febcb
 #define __TABLE_COUNTERS_H__
 
 typedef struct {
-       uint64_t restriction_id;
-       int64_t data_counter;
-       int64_t warn_counter;
-       int64_t monthly_counter;
-       int64_t weekly_counter;
-       int64_t daily_counter;
+       long long int restriction_id;
+       long long int data_counter;
+       long long int warn_counter;
+       long long int monthly_counter;
+       long long int weekly_counter;
+       long long int daily_counter;
        int32_t month_start_date;
-       int64_t month_start_ts;
-       int64_t week_start_ts;
-       int64_t day_start_ts;
+       long long int month_start_ts;
+       long long int week_start_ts;
+       long long int day_start_ts;
 } table_counters_info;
 
 typedef stc_cb_ret_e(*table_counters_info_cb)(const table_counters_info *info,
                                              void *user_data);
 
-stc_error_e table_counters_get(uint64_t restriction_id,
+stc_error_e table_counters_get(long long int restriction_id,
                               table_counters_info *info);
 
 stc_error_e table_counters_update_counters(const table_counters_info *info);
 
-stc_error_e table_counters_get_timestamps(uint64_t restriction_id,
+stc_error_e table_counters_get_timestamps(long long int restriction_id,
                                        table_counters_info *info);
 
 stc_error_e table_counters_update_timestamps(const table_counters_info *info);
 
-stc_error_e table_counters_delete(uint64_t restriction_id);
+stc_error_e table_counters_delete(long long int restriction_id);
 
 stc_error_e table_counters_prepare(sqlite3 *db);
 
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index e9d46bf..4f4528a
@@ -25,13 +25,13 @@ typedef struct {
        stc_iface_type_e iftype;
        stc_rstn_type_e rstn_type;
        stc_roaming_type_e roaming;
-       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;
-       uint64_t restriction_id;
+       long long int restriction_id;
 } table_restrictions_info;
 
 typedef stc_cb_ret_e
old mode 100644 (file)
new mode 100755 (executable)
index 96c15c5..78b7723 100755 (executable)
@@ -237,11 +237,11 @@ static void __finalize_insert(void)
        __STC_LOG_FUNC_EXIT__;
 }
 
-static bool __table_counters_is_entry_present(uint64_t restriction_id)
+static bool __table_counters_is_entry_present(long long int restriction_id)
 {
        bool ret = FALSE;
        int rc;
-       uint64_t l_restriction_id = -1;
+       long long int l_restriction_id = -1;
        sqlite3_stmt *stmt = select_restriction_id;
 
        if (sqlite3_bind_int(stmt, 1, restriction_id) != SQLITE_OK) {
@@ -271,7 +271,7 @@ handle_error:
        return ret;
 }
 
-API stc_error_e table_counters_get(uint64_t restriction_id,
+API stc_error_e table_counters_get(long long int restriction_id,
                               table_counters_info *info)
 {
        stc_error_e error_code = STC_ERROR_NONE;
@@ -359,7 +359,7 @@ handle_error:
 }
 //LCOV_EXCL_STOP
 
-API stc_error_e table_counters_get_timestamps(uint64_t restriction_id,
+API stc_error_e table_counters_get_timestamps(long long int restriction_id,
                                                                                table_counters_info *info)
 {
        stc_error_e error_code = STC_ERROR_NONE;
@@ -443,7 +443,7 @@ handle_error:
 //LCOV_EXCL_STOP
 
 
-API stc_error_e table_counters_delete(uint64_t restriction_id)
+API stc_error_e table_counters_delete(long long int restriction_id)
 {
        stc_error_e error_code = STC_ERROR_NONE;
        sqlite3_stmt *stmt = delete_counter;
index ffb4b97..7670e28 100755 (executable)
@@ -585,8 +585,8 @@ API stc_error_e table_statistics_insert(stc_db_classid_iftype_key *stat_key,
        stc_error_e error_code = STC_ERROR_NONE;
        sqlite3_stmt *stmt = update_statistics_query;
        stc_hw_net_protocol_type_e hw_net_protocol_type = STC_PROTOCOL_UNKNOWN;
-       int64_t rcv;
-       int64_t snd;
+       long long int rcv;
+       long long int snd;
 
        if (!stat->rcv_count && !stat->snd_count) {
                error_code = STC_ERROR_INVALID_PARAMETER;
index 1d6d0c6..24376f3 100755 (executable)
@@ -108,7 +108,7 @@ static void add_string_attr(struct genl *req, const char *str, int type)
        add_value_attr(req, str, strlen(str) + 1, type);
 }
 
-static void add_uint64_attr(struct genl *req, const uint64_t v, int type)
+static void add_uint64_attr(struct genl *req, const long long unsigned int v, int type)
 {
        add_value_attr(req, &v, sizeof(v), type);
 }
@@ -147,7 +147,7 @@ static stc_error_e nfacct_send_new(nfacct_rule_s *counter)
        add_uint64_attr(req, 0, NFACCT_BYTES);
        //LCOV_EXCL_START
        if (counter->quota) {
-               STC_LOGD("quota bytes %"PRId64, counter->quota);
+               STC_LOGD("quota bytes %lld", counter->quota);
 
                add_uint32_attr(req, htobe32(NFACCT_F_QUOTA_BYTES),
                                NFACCT_FLAGS);
old mode 100644 (file)
new mode 100755 (executable)
index 4506f0e..97c9b5e
@@ -117,12 +117,12 @@ struct nfacct_rule {
 
        struct counter_arg *carg;
        stc_error_e(*iptables_rule)(struct nfacct_rule *counter);
-       int64_t quota;
+       long long int quota;
        int quota_id;
        stc_roaming_type_e roaming;
 
-       int64_t send_limit;
-       int64_t rcv_limit;
+       long long int send_limit;
+       long long int rcv_limit;
 };
 
 typedef struct nfacct_rule nfacct_rule_s;
index cd961e6..91dd1e2 100755 (executable)
@@ -67,7 +67,7 @@ static void __stc_extract_pcap(const char *key, GVariant *value,
        }
 
        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);
                STC_LOGD("ifname: [%s]", pcap->ifname);
index ffe1a85..42bf9bc 100755 (executable)
@@ -195,13 +195,13 @@ static void __stc_extract_restriction_rule(const char *key, GVariant *value,
        }
 
        if (!g_strcmp0(key, "app_id")) {
-               guint str_length;
+               gsize str_length;
                const gchar *str = g_variant_get_string(value, &str_length);
                rule->app_id = g_strdup(str);
                STC_LOGD("app_id: [%s]", rule->app_id);
 
        } else if (!g_strcmp0(key, "ifname")) {
-               guint str_length;
+               gsize str_length;
                const gchar *str = g_variant_get_string(value, &str_length);
                rule->ifname = g_strdup(str);
                STC_LOGD("ifname: [%s]", rule->ifname);
@@ -239,7 +239,7 @@ static void __stc_extract_restriction_rule(const char *key, GVariant *value,
                STC_LOGD("roaming: [%u]", rule->roaming);
 
        } else if (!g_strcmp0(key, "subscriber_id")) {
-               guint str_length;
+               gsize str_length;
                const gchar *str = g_variant_get_string(value, &str_length);
                rule->subscriber_id = g_strdup(str);
                STC_LOGD("subscriber_id: [%s]", rule->subscriber_id);
@@ -249,7 +249,7 @@ static void __stc_extract_restriction_rule(const char *key, GVariant *value,
                STC_LOGD("type: [%u]", (unsigned int) rule->rstn_type);
 
        } else if (!g_strcmp0(key, "mac")) {
-               guint str_length;
+               gsize str_length;
                const gchar *str = g_variant_get_string(value, &str_length);
                rule->mac = g_strdup(str);
                STC_LOGD("mac: [%s]", rule->mac);