kibak.yoon [Wed, 8 Jun 2016 03:45:22 +0000 (12:45 +0900)]
sensord: store unknown rotation event when auto_rotation sensor starts
- when sensor starts, it would be better to store unknown rotation event
for getting auto_rotation sensor data.
Change-Id: I68e25ec9460b7959b200185ef674adc2293a3b55
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
(cherry picked from commit
6c74491e0abe56efac3f217ddcd34323cc135272)
kibak.yoon [Mon, 23 May 2016 12:51:29 +0000 (21:51 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0:
sensord: fix default interval when there is no client which registers event
Change-Id: I8fd5947339dea0ce349de671215ea0e02466f7bc
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Mon, 23 May 2016 12:47:05 +0000 (21:47 +0900)]
sensord: fix default interval when there is no client which registers event
- POLL_MAX_HZ_MS is too big, so it has to be changed to POLL_10HZ_MS(default)
Change-Id: I611c0983c601c02ab822b700efda4153dcb6a420
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Mon, 23 May 2016 06:55:57 +0000 (15:55 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0:
sensord: version up 2.0.5
sensord:fix compiler warnings due to the comparison of the signed and unsigned int
sensord: set cynara configuration for cache size
sensord: terminate sensor daemon safely
sensord: auto_rotation: fix interval setting in auto_rotation
sensord: change raw pointer to shared pointer for managing device(HAL) handles
sensord: set signal fd to poller for knowing what signal is received
sensord: add stop() in event_dispatcher thread
sensord: add log message in destructor of sensors
sensord: add lock in permission_checker functions
sensord: add a newline for code readability
sensord: check whether client list is empty or not before using std::find()
sensord: put a space after "if"
sensord: enable rotation vector/orientation sensors
sensord: remove unused rotation vector source files
sensord: clean up the code detected by style checker
sensord: add coding style checker scripts
Change-Id: I458a433b9856667805e3f9b0a0fc53709ff522e2
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Mon, 23 May 2016 06:44:33 +0000 (15:44 +0900)]
sensord: version up 2.0.5
Change-Id: I7502e5b53f45ccfdd35a25b11df337f242730c37
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Mon, 23 May 2016 06:46:30 +0000 (15:46 +0900)]
sensord:fix compiler warnings due to the comparison of the signed and
unsigned int
-Wsign-compare
Change-Id: I0f1b785c38aa3972a0b3fc249cf02f532d05d3e3
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 19 May 2016 04:11:32 +0000 (13:11 +0900)]
sensord: set cynara configuration for cache size
- cynara cache size : 16
Change-Id: Ia28f3b0da49a731ff2fa7493800482cdd08e77ad
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 19 May 2016 02:54:50 +0000 (11:54 +0900)]
sensord: terminate sensor daemon safely
- checking event by using select() before accept()
if event is accepted when sensord is terminating, restoring connection has
a problem that client cannot connect to sensord.
- in server, quit g_main_loop and close socket safely.
- sensord.service : off restart option
Change-Id: Ibb2c9eca3cdc26b9782e93d3a3e0337b0a28f1a0
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 19 May 2016 02:54:06 +0000 (11:54 +0900)]
sensord: auto_rotation: fix interval setting in auto_rotation
- use interval instead of m_interval
Change-Id: I8ae7d1371f8b9e4c7110f1caf4b7541f45c239ea
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Wed, 18 May 2016 12:17:24 +0000 (21:17 +0900)]
sensord: change raw pointer to shared pointer for managing device(HAL)
handles
- erase items in map and dlclose so handle in destructor explicitly
Change-Id: I8c7e8359fe9741b31f857e127c3a8e2a192df1c7
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Wed, 18 May 2016 12:04:48 +0000 (21:04 +0900)]
sensord: set signal fd to poller for knowing what signal is received
- delete fds which is added to poller when event_poller is destroyed.
Change-Id: I098326f609b215e448c92420d88cfa7616d8f9c9
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Wed, 18 May 2016 11:56:26 +0000 (20:56 +0900)]
sensord: add stop() in event_dispatcher thread
- because sensord can be shutdown, event_dispatcher can be stopped.
Change-Id: Idd59e0f34dad468c3f4a32d3a47e4329cdec0936
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Wed, 18 May 2016 11:52:46 +0000 (20:52 +0900)]
sensord: add log message in destructor of sensors
- add NULL check in get_name() in physical_sensor
Change-Id: Idef67bd894d46e141a674302415893015131437e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Wed, 18 May 2016 11:48:42 +0000 (20:48 +0900)]
sensord: add lock in permission_checker functions
Change-Id: I1969e07d02482f44d6db810b3c33b17b4282d28d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Wed, 18 May 2016 11:46:29 +0000 (20:46 +0900)]
sensord: add a newline for code readability
Change-Id: Ida83fdfcdedf399a8de927fcb7ee344541267db4
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Wed, 18 May 2016 11:40:38 +0000 (20:40 +0900)]
sensord: check whether client list is empty or not before using
std::find()
- if client list is empty, almost of functions in client_info_manager are unnecessary.
Change-Id: Ifce3bba890238bf8e2456362f41687111a00340b
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Wed, 18 May 2016 07:35:19 +0000 (16:35 +0900)]
sensord: put a space after "if"
- fixed all code in sensord
Change-Id: Ia56bcb22e7ada3f559c9a650a31bbd5ed067b317
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Wed, 11 May 2016 08:59:00 +0000 (17:59 +0900)]
sensord: enable rotation vector/orientation sensors
- applied simple fusion algorithm
Change-Id: I31b0c09a29595804946f8a105198bee381d090ae
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Wed, 11 May 2016 08:56:32 +0000 (17:56 +0900)]
sensord: remove unused rotation vector source files
Change-Id: I3a362c3204dc300c0f0b2a9ecbf37a85ce75f6f4
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 10 May 2016 12:22:45 +0000 (21:22 +0900)]
sensord: clean up the code detected by style checker
- [LNE_R_TWS] Redundant blank line at the start of a code block should be deleted.
- [SPC_M_SEP] Missing space after ,
- [SPC_M_SEP] Missing space before ( in while(
- [SPC_M_SEP] Extra space after (
- [SPC_M_OPR] Missing spaces around <
- ...
Change-Id: I238c4c0be773ef2b9f0067a09b35049ed322cacd
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 10 May 2016 12:20:52 +0000 (21:20 +0900)]
sensord: add coding style checker scripts
- cpplint.sh is helper bash script to run cpplint_tizen.py easily
Change-Id: I5edc23e2b3b607f8815425ce97002e6ddfd9f11e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Mu-Woong Lee [Mon, 9 May 2016 01:18:55 +0000 (10:18 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0:
sensord: change gid/smack access rules of sensorhub nodes
Change-Id: Ie092712ad5de2f9f03ec118d274c705b1ccd12d9
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
kibak.yoon [Wed, 4 May 2016 08:00:37 +0000 (17:00 +0900)]
sensord: change gid/smack access rules of sensorhub nodes
Change-Id: I30adfb20b5bd4103cf81ce890df7585f181bb14e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 28 Apr 2016 02:12:57 +0000 (11:12 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0:
sensord: not install the unused virtual-sensor config file
Change-Id: I5b06b210ad08ea56c8ae94344800c2d86d2f7740
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 28 Apr 2016 01:55:27 +0000 (10:55 +0900)]
sensord: not install the unused virtual-sensor config file
Change-Id: I0015105b43efde840a4c05f5e95cc5fe5ba80528
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Mon, 25 Apr 2016 08:52:42 +0000 (17:52 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0:
sensord: version 2.0.4
sensord: change group of sensord from sensor to input
sensord: change uid/gid of sensord from root to sensor
sensord: reduce sensor logs which is printed when event is occurred
sensord: declare sensor types by using macro for converting type to string
sensord: gravity: set the value of accuracy in synthesize
sensord: change the max available interval until 255 seconds
sensord: add sensor types to log for debugging
Change-Id: I50981d2b9f66c76fae9b745cff77ec8f166ed7f2
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Mon, 25 Apr 2016 08:51:16 +0000 (17:51 +0900)]
sensord: version 2.0.4
Change-Id: Icacf7caab39e5ffc62255316b858b9deb8ddff50
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 19 Apr 2016 12:02:39 +0000 (21:02 +0900)]
sensord: change group of sensord from sensor to input
Change-Id: I4844d15d350fe7872534b39f2738cb5df70a18b9
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Mon, 18 Apr 2016 14:03:32 +0000 (23:03 +0900)]
sensord: change uid/gid of sensord from root to sensor
Change-Id: I6cc3794cba5dc2655f6b6f8ead57714b6c229678
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 12 Apr 2016 15:35:55 +0000 (00:35 +0900)]
sensord: reduce sensor logs which is printed when event is occurred
- there are so many logs when event is occurred.
so it is changed that the almost of event(like on_continuous event) is logged
once per 25.
if it is on_changed event, it is logged every event.
- removed the useless codes anymore in client_common.h
Change-Id: I403fe0c6efab8073a5380aab18c37fd10b83b503
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 12 Apr 2016 15:30:35 +0000 (00:30 +0900)]
sensord: declare sensor types by using macro for converting type to
string
- added macros in enum_factory.h
- DECLARE_ENUM
- DECLARE_ENUM_UTIL
- GENERATE_ENUM_UTIL
- although it is hard to understand, it can reduce so many duplicated codes.
Change-Id: Ice4436e5d232612e09e67aa9fdab4c2ac30a4ba4
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 7 Apr 2016 04:12:32 +0000 (13:12 +0900)]
sensord: gravity: set the value of accuracy in synthesize
* because the accuracy was omitted, it was added in synthesize_fusion.
Change-Id: I93e719274d818ac6bd8fc12ca15c7165ac564718
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 5 Apr 2016 14:06:34 +0000 (23:06 +0900)]
sensord: change the max available interval until 255 seconds
Change-Id: I4baa616fbf32cb7eadae7547904304cd90e58ce1
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 5 Apr 2016 14:05:54 +0000 (23:05 +0900)]
sensord: add sensor types to log for debugging
Change-Id: I6db2e0a00a2d32928f1595d4f6c30eb512104307
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Fri, 8 Apr 2016 05:15:55 +0000 (14:15 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0:
sensord: use shared_ptr for sensor data which can be used in serveral callbacks
sensord: remove unused cb_type in library
sensord: add internal sensor types
sensord: add the checking EAGAIN while the data is sent by socket
Change-Id: Ibe7a3805b6aa23406f451f50bb4d4725d73fdd7d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 7 Apr 2016 13:48:12 +0000 (22:48 +0900)]
sensord: use shared_ptr for sensor data which can be used in serveral callbacks
* if app uses 2 more listener with the same sensor, then callback is called twice
with the same sensor data. but in that case, because the first
callback wrapper releases the data memory, second callback uses this
data and even releases the memory which is already released. and it
makes the crash.
* so in order to fix it, shared_ptr is used.
Change-Id: I48af5f35a55738d3a7469ab2fa6225e64e39cb71
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 7 Apr 2016 09:06:51 +0000 (18:06 +0900)]
sensord: remove unused cb_type in library
* because legacy API is not supported anymoyre, cb_type is unnecessary.
Change-Id: I723c28555c1d08106d9b21e3bc332c7c3056a179
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 7 Apr 2016 03:17:11 +0000 (12:17 +0900)]
sensord: add internal sensor types
below sensor types is added:
+ EXERCISE_SENSOR
+ GESTURE_MOVEMENT_STATE_SENSOR
+ WEAR_STATUS_SENSOR
+ WEAR_ON_MONITOR_SENSOR
+ GPS_BATCH_SENSOR
+ ACTIVITY_TRACKER_SENSOR
+ SLEEP_DETECTOR_SENSOR
Change-Id: Ia6c099c76defb3fd7327e56f2d02d160779ec8ab
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 5 Apr 2016 05:25:49 +0000 (14:25 +0900)]
sensord: add the checking EAGAIN while the data is sent by socket
If socket is not available to use it temporarily,
EAGAIN(EWOULDBLOCK) is returned by ::send().
so in order to prevent that data are omitted, retry to send it.
Change-Id: I4b8bcf1fefa1b20e820ec127d24b2e61f6253edf
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 5 Apr 2016 07:45:20 +0000 (16:45 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0:
sensord: change default return value to true for additional commands/HAL APIs
Change-Id: I914060a42f855dcaec179d520037cdd23ce9a9c3
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 5 Apr 2016 07:36:30 +0000 (16:36 +0900)]
sensord: change default return value to true for additional commands/HAL
APIs
- set_interval(uint32_t id, unsigned long val)
- set_batch_latency(uint32_t id, unsigned
- set_attribute_int(uint32_t id, int32_t attribute, int32_t value)
- set_attribute_str(uint32_t id, int32_t attribute, char *value, int value_len)
- flush(uint32_r id)
Change-Id: I63d9110f950948a4ff3a4236b2afef285202a92d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 5 Apr 2016 01:37:38 +0000 (10:37 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0: (31 commits)
Revert "sensorctl test"
sensorctl test
sensord: replace 0x% with %#
sensord: change static function to member function about get_timestamp()
sensor-hal: sync with the latest HAL interface
sensord: set calibration at booting time if cal_node is existed
sensord: fix the memory leak when get_data is failed
sensord: remove unused variable
sensor_base: add sensor event data caching for sync-read support
sensord: use memcpy instead of copying values
sensord: in similar with the interval, sensor attributes are separately maintained for each client.
sensord: skip the get_data process when there are some problems
sensord: hal: splite sensor_hal.h into sensor_hal interface and hal types
sensord: add the comments for logic
sensord: check whether the data is valid or not
sensord: change sensor name to be the same as an sensor type name
sensord: remove unused code in auto_rotation sensor
poller: continue to handle remaining events even if on_event() returns false
sensor_base: add data length parameter to on_event()
sensord: close handles in sensor_loader destructor
...
Change-Id: I6c1d88a091826e7895f98cad68507f16d968f10b
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Kibak Yoon [Tue, 5 Apr 2016 01:25:42 +0000 (18:25 -0700)]
Revert "sensorctl test"
This reverts commit
2f18f5a17af85c0b0c70d77c7a800f9ee14d6cef.
Change-Id: I8806d63b95156b4d9402eae26502ba24b1921657
kibak.yoon [Mon, 4 Apr 2016 13:30:33 +0000 (22:30 +0900)]
sensorctl test
Change-Id: Ibec35d870f89260eaeeaa39a98dfcc488d536373
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Mon, 4 Apr 2016 08:38:58 +0000 (17:38 +0900)]
sensord: replace 0x% with %#
- %# adds "0x" prefix according to data type
Change-Id: I7d20614603c18d14e4710b04c59aaa7f10a8e7f3
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Mon, 4 Apr 2016 01:33:57 +0000 (10:33 +0900)]
sensord: change static function to member function about get_timestamp()
* there is no reason for get_timestamp() function to be static.
Change-Id: Ie8531a2bcde5523f6219ffb16aa11dd25b3034fc
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Fri, 1 Apr 2016 13:49:32 +0000 (22:49 +0900)]
sensor-hal: sync with the latest HAL interface
Change-Id: I7b718bbfd14ff39f39c6adb9b16fe7935ae339d0
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Fri, 1 Apr 2016 13:49:00 +0000 (22:49 +0900)]
sensord: set calibration at booting time if cal_node is existed
* calibration is needed on tw1 device
Change-Id: Ie84d5c391269352b701d882b9c163b90f76c1307
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Mon, 28 Mar 2016 15:39:13 +0000 (00:39 +0900)]
sensord: fix the memory leak when get_data is failed
- problem: if sensor->get_data() is failed, event memory is not freed.
so there is memory-leak problem.
- solution: the allocation code of the event meory is moved when it is needed.
Change-Id: If42ab454c269ceab2ed64a13a9915cab23a2822e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Fri, 1 Apr 2016 12:15:06 +0000 (21:15 +0900)]
sensord: remove unused variable
- remove compliler warning.
Change-Id: I47f2788ca8d09902d1f2d6342c77fd258b91412e
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Mu-Woong Lee [Thu, 31 Mar 2016 10:32:23 +0000 (19:32 +0900)]
sensor_base: add sensor event data caching for sync-read support
With this patch, sync-read requests from clients do not need to call get_data() functions of HALs anymore.
Change-Id: I00560691f23fe15a0d785f7597b78b75b939a930
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
kibak.yoon [Thu, 31 Mar 2016 10:19:13 +0000 (19:19 +0900)]
sensord: use memcpy instead of copying values
* if value_count is over 16(max value count), it makes a problem when
values is copied in loop.
Change-Id: I8f07fe76909fe995027a604ac18bb9cdb6fbf827
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Mu-Woong Lee [Mon, 21 Mar 2016 09:48:08 +0000 (18:48 +0900)]
sensord: in similar with the interval, sensor attributes are separately maintained for each client.
Change-Id: If3ced3df21fd9cc84ae55d9d113487efa3d95895
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
kibak.yoon [Thu, 31 Mar 2016 01:43:55 +0000 (10:43 +0900)]
sensord: skip the get_data process when there are some problems
* after initializing data pointer, skip the get_data process
Change-Id: Ie4fc53f7d3f529821542875ff97f6839dce0dfee
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Wed, 23 Mar 2016 03:20:52 +0000 (12:20 +0900)]
sensord: hal: splite sensor_hal.h into sensor_hal interface and hal
types
Change-Id: If9ec7348721581839faecf022e29c88134debe68
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 22 Mar 2016 14:09:30 +0000 (23:09 +0900)]
sensord: add the comments for logic
Change-Id: I68bf587381b3a9371512d3d2c74cb5091c496b94
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 22 Mar 2016 14:08:12 +0000 (23:08 +0900)]
sensord: check whether the data is valid or not
Change-Id: Ia456be16c90f949b1d32bbdc53579b41d58a477d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Wed, 16 Mar 2016 13:01:10 +0000 (22:01 +0900)]
sensord: change sensor name to be the same as an sensor type name
* "*_SENSOR" instead of "SENSOR_"
* this patch is applied to virtual sensors
Change-Id: I9c5af4a00f2e6dbff217ae6cc4bcaec4848d0a02
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Fri, 1 Apr 2016 11:44:59 +0000 (20:44 +0900)]
sensord: remove unused code in auto_rotation sensor
* loading values from virtual_sensor config is not used in auto rotation
sensor, so remove them and related-macros.
* remove unused function
Change-Id: I78b48351a334ab0861268587568fb77c3c5cdd3a
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Mu-Woong Lee [Fri, 18 Mar 2016 11:50:20 +0000 (20:50 +0900)]
poller: continue to handle remaining events even if on_event() returns false
Change-Id: I93759e5aa8cfb46daacff01fff7763489e9827ee
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
Mu-Woong Lee [Mon, 21 Mar 2016 03:01:49 +0000 (12:01 +0900)]
sensor_base: add data length parameter to on_event()
Change-Id: I7b29eb919534e741816ceeb06fd5ddb72919707e
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
kibak.yoon [Thu, 31 Mar 2016 01:41:24 +0000 (10:41 +0900)]
sensord: close handles in sensor_loader destructor
Change-Id: Ie24606b850a13708956808b36210a86983d62ae3
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 31 Mar 2016 01:35:07 +0000 (10:35 +0900)]
sensord: fix memory leak in virtual sensors
* event memory has to be not released when error happens
Change-Id: I53fe2d366069b773b6d9b05c052fa9ac56f85e0d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 31 Mar 2016 01:26:41 +0000 (10:26 +0900)]
sensord: remove useless buffer parameter
* buffer in callback_info is not used anymore, remove it
Change-Id: I5a52e869e48972dcde7593a1cfd4333b380cb728
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 31 Mar 2016 01:24:52 +0000 (10:24 +0900)]
sensord: fix memory leak when legacy cb is used
* when legacy cb is used, allocation of event is useless
Change-Id: I1698884940a6744f78963a28746e5b9e4313ec00
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Wed, 30 Mar 2016 13:16:07 +0000 (22:16 +0900)]
sensord: init epoll_event variable
* if it does not set the value and some problem is happened at first,
later, other developers can make a mistake. so for preventing it,
initialize this variable's members.
Change-Id: I1c2fe47d816c50a524178d5a657b65cec929d4d2
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Mu-Woong Lee [Mon, 28 Mar 2016 13:40:33 +0000 (22:40 +0900)]
sensor_base: modify get_timestamp() to protected functions
Change-Id: Ideaf97be8e3b9440b4cb4446b6fb0db843e38fc5
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
kibak.yoon [Thu, 24 Mar 2016 12:04:49 +0000 (21:04 +0900)]
sensord: remove the unnecessary debug log
- a client can have serveral handles(it is same as listener) and each of
handles can register each other sensor event. so there are so many cases
that some event is not registered to handle.
- so it is unnecessary to show dlog.
Change-Id: Ib97a269e9368964baef84505895bd05ace2fde73
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 24 Mar 2016 04:10:21 +0000 (13:10 +0900)]
sensord: change the default return value to true
Change-Id: Ie943cef2f4375a0cdb2f5909c671218a620b98db
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 24 Mar 2016 01:01:59 +0000 (10:01 +0900)]
sensord: fix the bug about calling get_client_name
Change-Id: I671c013bad4215ab41a0ec47bb88ad6fa2621077
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Fri, 1 Apr 2016 10:14:42 +0000 (19:14 +0900)]
sensord: remove the changing g_main_context API
* this feature is not used anymore
Change-Id: I9073d2ee3908ca5d332b7659801e7f0f2b00d825
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Fri, 1 Apr 2016 09:26:50 +0000 (18:26 +0900)]
sensord: redefine _ERRNO macro to use easily
* in previous code, if additional message is needed for log, the another log
has to be added. so redefine the macro for using it easily.
Change-Id: Ia05199f45acb1d23bf9142ab43e70898101b1a7a
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Mu-Woong Lee [Thu, 31 Mar 2016 03:00:04 +0000 (20:00 -0700)]
Merge "sensord: rename sensord_get_sensor_*_ex() APIs to proper names" into devel/tizen_3.0
kibak.yoon [Wed, 30 Mar 2016 04:41:33 +0000 (13:41 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0:
sensord: raise SIGKILL when sensord receive SIGTERM
sensord: fix the bug that it releases static variable
sensord: fix the bug about checking 0 although sensor_id can be 0
Change-Id: I9cbf883878470988b5159d5ec69f87e491a8c216
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Wed, 30 Mar 2016 04:35:03 +0000 (13:35 +0900)]
sensord: raise SIGKILL when sensord receive SIGTERM
Change-Id: Idc6bc5b64441cc088c0d688d8b0f7980529522f9
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Wed, 30 Mar 2016 04:37:17 +0000 (13:37 +0900)]
sensord: fix the bug that it releases static variable
Change-Id: Ic27ab5bcb886fe82c36f75e3970929485c0f3119
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 29 Mar 2016 14:03:01 +0000 (23:03 +0900)]
sensord: fix the bug about checking 0 although sensor_id can be 0
Change-Id: I6bf57b579a3aafd53d203ae9283ffd1da5955975
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 29 Mar 2016 13:02:46 +0000 (22:02 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0:
sensord: fix the bug that gravity synthesize has to skip the all event except of accelerometer event
Change-Id: If82f47dc22f01467f8ad7f87c6f74a14486ed51d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 29 Mar 2016 12:57:53 +0000 (21:57 +0900)]
sensord: fix the bug that gravity synthesize has to skip the all event
except of accelerometer event
Change-Id: I39c074b12584469c8ca5030dcbe28ee8223eaced
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 29 Mar 2016 01:43:01 +0000 (10:43 +0900)]
sensord: rename sensord_get_sensor_*_ex() APIs to proper names
Change-Id: I19b2c7aed8a6d02249bb91d02df87291b1d18f3f
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Mon, 28 Mar 2016 02:37:44 +0000 (11:37 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0:
get: increase the polling duration limit for sync read
Change-Id: Ic971950a67c398c86d41c6d2a538bec0e2d62da8
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
Mu-Woong Lee [Fri, 25 Mar 2016 14:18:00 +0000 (23:18 +0900)]
get: increase the polling duration limit for sync read
Change-Id: I02950e507446c6a69a28ceba96f6373b1d9c0bf6
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
kibak.yoon [Fri, 25 Mar 2016 08:38:41 +0000 (17:38 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0:
sensord: remove the unnecessary checking code
sensord: add get_sensor_*_ex internal APIs for getting error properly
sensord: send permission-needed sensor information to client
Change-Id: Ifdf6ae692567006196c84f59ba83434bd3f334bb
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Fri, 25 Mar 2016 08:36:26 +0000 (17:36 +0900)]
sensord: remove the unnecessary checking code
Change-Id: Icc7c48acc0421bbd77b4f6f34bb3097088a3fc9d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 24 Mar 2016 16:57:05 +0000 (01:57 +0900)]
sensord: add get_sensor_*_ex internal APIs for getting error properly
* if clients uses sensord_get_sensor/sensord_get_sensor_list APIs to get
sensor handle(s), they cannot know the error exactly. because APIs
return only bool or handle itself, not including error info.
Change-Id: I83e9c28217621a5a6ab3c5e35dd45c84a5056cea
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 24 Mar 2016 16:48:20 +0000 (01:48 +0900)]
sensord: send permission-needed sensor information to client
* client needs to know whether the error is operation_failed or
permission_denied. therefore server has to send all of sensor list to
client.
* if it is previleged sensor, server sends the type information only.
Change-Id: I2563d457b0aa039ebbc3f83121aa47b18dfa06bc
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 24 Mar 2016 08:33:23 +0000 (17:33 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0:
sensord: remove the error log that is not error actually
Change-Id: I2299cb0a1e751467b10a7b8ad7507ef537e7a94c
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 24 Mar 2016 08:25:12 +0000 (17:25 +0900)]
sensord: remove the error log that is not error actually
Change-Id: Ie4d83fbf60eb4d348164b2e7498855bc3eb1bbd1
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Mon, 21 Mar 2016 08:14:00 +0000 (17:14 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0:
sensord: add the checker whether m_sock_fd is valid or not
sensord: change return value from bool to int
sensord: [Svace] change strerror to strerror_r
sensord: [svace] change readdir to readdir_r
sensord: add AUTO_ROTATION_SENSOR to log
Change-Id: Ied6a049aa0a48e6e1c7a22eb94ec0ea0dcaf3db9
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Fri, 18 Mar 2016 11:09:54 +0000 (20:09 +0900)]
sensord: add the checker whether m_sock_fd is valid or not
Change-Id: I9b8fe4cd7825607197e618e1eede25036b1223cd
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Fri, 18 Mar 2016 04:12:38 +0000 (13:12 +0900)]
sensord: change return value from bool to int
Change-Id: I8b6cc10e0c8ed9f126d58f3097545e64fd655f16
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 17 Mar 2016 11:10:27 +0000 (20:10 +0900)]
sensord: [Svace] change strerror to strerror_r
- make macro for strerror_r
- strerror_r returns error message that it is from buf or static string
according to a man page
* details
"This may be either a pointer to a string that the function stores in
buf, or a pointer to some (immutable) static string (ini which case
buf is unused)."
Change-Id: Ifbca885a211e53d74e29268a25b597ff4d2897af
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 17 Mar 2016 08:19:42 +0000 (17:19 +0900)]
sensord: [svace] change readdir to readdir_r
Change-Id: I3736cc026ac64efd05a9ca0b41f1a60daae3a306
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Thu, 17 Mar 2016 02:32:42 +0000 (11:32 +0900)]
sensord: add AUTO_ROTATION_SENSOR to log
Change-Id: Id1d51345cf1f563e2916a355854b7aa4eb968e03
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 15 Mar 2016 09:13:46 +0000 (18:13 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0:
sensord: fix build break about using {libdir} macro instead of {unitdir} for systemd path
Change-Id: I1b0546b34f40f1d61518de621425fcd2f4aea6af
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 15 Mar 2016 09:06:35 +0000 (18:06 +0900)]
sensord: fix build break about using {libdir} macro instead of {unitdir} for systemd path
Change-Id: I8848ccc0f373f1390b0d33de54dee58c0a741b95
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 15 Mar 2016 04:39:00 +0000 (13:39 +0900)]
Merge branch 'devel/tizen_3.0' into tizen
* devel/tizen_3.0: (21 commits)
sensord: version 2.0.3
sensord: enable hrm/gravity/linear accel sensors
sensord: call on_event() after invoking sensor event from fd
sensord: add sensord_flush internal API for batching
sensord: sync/clean up sensord source code
hal: add/sync sensor device types
sensord: remove set_wakeup API and implementations
libsensord: Disable deprecated sf_* APIs
sensord: remove sensord compiler warnings
sensord: fix the svace issue because of using non-terminated string
sensord: fix the bug/memory leak/inefficient code
sensord: lazy loading atexit() because static variables is used in atexit()
sensord: clean up the source code
sensord: clean up boiler plates
sensord: restructuring sensord directories
sensord: move .service/.socket to packaging
sensord: fix the bug that set_attribute returns bool
sensord: if poll() is failed, return false
sensord: change to systemd socket
sensord: fix the bug about calling read_sensor_data
...
Change-Id: I28f80d3f815c4ce38b832dc9471fc787e23bcc5a
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 15 Mar 2016 04:38:08 +0000 (13:38 +0900)]
sensord: version 2.0.3
Change-Id: I611a00ecddc428613d492f4dcde289ea670fa54a
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 15 Mar 2016 02:52:42 +0000 (11:52 +0900)]
sensord: enable hrm/gravity/linear accel sensors
Change-Id: I9595bbcb4a0f194b06b1d1f458fb410f179afcd6
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
kibak.yoon [Tue, 15 Mar 2016 02:45:34 +0000 (11:45 +0900)]
sensord: call on_event() after invoking sensor event from fd
Change-Id: I616af576afe22cb512cfc3f8c5be76c458af7e8d
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>