Fix svace issue
authorsaerome.kim <saerome.kim@samsung.com>
Tue, 22 Oct 2019 08:11:31 +0000 (17:11 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Wed, 23 Oct 2019 00:32:32 +0000 (09:32 +0900)
413217, 413218, 413219: signed to big unsigned issue.

Change-Id: If1d7b3906f666a625407cbcd5c26e3c23095ca8e
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
include/user-awareness-private.h
packaging/capi-network-ua.spec
src/user-awareness-monitors.c
src/user-awareness-users.c
test/uat-init.c

index 3d48c5d3f971589c8603f1a70dd157896dffff25..3276f0be4edbacd83937fd90a7306e1f55bc39b0 100644 (file)
@@ -247,7 +247,7 @@ typedef struct {
        gboolean isadded; /**< Is the user addition completed? */
        gboolean default_user; /**< Is it a default user? */
        gboolean create_by_app; /**< Did app add this user information? */
-       long last_presence_timestamp; /**< timestamp of last presence */
+       unsigned long long last_presence_timestamp; /**< timestamp of last presence */
 } ua_user_info_s;
 
 /**
@@ -863,7 +863,7 @@ ua_user_h _ua_get_user_handle_by_account(const char *account);
  * @post
  */
 void _ua_set_user_last_presence_timestamp(ua_user_h user_handle,
-                                         long timestamp);
+               unsigned long long timestamp);
 
 /**
  * @brief Checks whether a device exists in device list.
index c78d9c9ceedf48c7976c8bbb867ca8d84b7398fc..5370229ddf3a4f392dbe0d6383acc965aa988bf1 100644 (file)
@@ -1,6 +1,6 @@
 Name: capi-network-ua
 Summary: User Awareness Framework CAPI
-Version: 0.12.2
+Version: 0.12.3
 Release: 1
 License: Apache-2.0
 Source0: %{name}-%{version}.tar.gz
index 7650639c08ac7f26710a175a96df0fbfe938ee89..0e0c9cdb3e17ee02978ddbcb8195f2ca4c17bfde 100644 (file)
@@ -472,7 +472,7 @@ static void __ua_monitor_send_sensor_presence_cb(ua_monitor_s *monitor,
 }
 
 static void __ua_sensor_presence_detected(ua_monitor_s *monitor,
-               ua_sensor_info_s *sensor_info, char *account, long timestamp,
+               ua_sensor_info_s *sensor_info, char *account, unsigned long long timestamp,
                char *device_id)
 {
        FUNC_ENTRY;
index 4a5a98e7ddb550df038baed4336258fc08c89bb9..3db665a02202290baf329b28d0526e5bedbedf08 100644 (file)
@@ -281,7 +281,7 @@ ua_user_h _ua_get_user_handle_by_account(const char *account)
 }
 
 void _ua_set_user_last_presence_timestamp(ua_user_h user_handle,
-       long timestamp)
+       unsigned long long timestamp)
 {
        FUNC_ENTRY;
        ua_user_info_s *user = (ua_user_info_s *)user_handle;
index 1392e01b216371b3ba5b268d49f15b90b3f95233..ea42041d2836aff1303b79fec2d863299d981d53 100644 (file)
@@ -220,16 +220,16 @@ static void __sensor_status_changed_cb(ua_monitor_h handle,
                msg(" - ua_sensor_get_status() ret: [0x%X] [%s]",
                        ret, uat_get_error_str(ret));
        }
-       msgc("[%s] Sensor Status Changed -> %s",
-               uat_get_sensor_bitmask_str(sensor),
-               status == UA_SENSOR_PRESENCE ? "PRESENCE" : "ABSENCE");
-
        ret = ua_sensor_get_bitmask(sensor_handle, &sensor);
        if (UA_ERROR_NONE != ret) {
                msg(" - ua_sensor_get_bitmask() ret: [0x%X] [%s]",
                        ret, uat_get_error_str(ret));
        }
 
+       msgc("[%s] Sensor Status Changed -> %s",
+               uat_get_sensor_bitmask_str(sensor),
+               status == UA_SENSOR_PRESENCE ? "PRESENCE" : "ABSENCE");
+
        ret = ua_sensor_get_timestamp(sensor_handle, &timestamp);
        if (UA_ERROR_NONE != ret) {
                msg(" - ua_sensor_get_timestamp() ret: [0x%X] [%s]",