sensord: fix the bug about checking 0 although sensor_id can be 0 47/64047/1
authorkibak.yoon <kibak.yoon@samsung.com>
Tue, 29 Mar 2016 14:03:01 +0000 (23:03 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Tue, 29 Mar 2016 14:03:01 +0000 (23:03 +0900)
Change-Id: I6bf57b579a3aafd53d203ae9283ffd1da5955975
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/server/command_worker.cpp

index ae4685f..b10071f 100644 (file)
@@ -220,7 +220,7 @@ bool command_worker::stopped(void *ctx)
                        inst->m_module->stop();
                }
 
-               if (inst->m_sensor_id) {
+               if (inst->m_sensor_id > UNKNOWN_SENSOR) {
                        if (get_client_info_manager().has_sensor_record(inst->m_client_id, inst->m_sensor_id)) {
                                _I("Removing sensor[0x%llx] record for client_id[%d]", inst->m_sensor_id, inst->m_client_id);
                                get_client_info_manager().remove_sensor_record(inst->m_client_id, inst->m_sensor_id);