Do not update client's attribute cache when attribute is SENSORD_ATTRIBUTE_FLUSH 68/223968/1
authorBoram Bae <boram21.bae@samsung.com>
Wed, 5 Feb 2020 07:31:51 +0000 (16:31 +0900)
committerBoram Bae <boram21.bae@samsung.com>
Wed, 5 Feb 2020 07:57:02 +0000 (16:57 +0900)
Change-Id: If91bbdae0e777927b2a930d494fcc0126fbffccf
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
src/client/sensor_listener.cpp
src/sensorctl/testcase/sensor_provider.cpp

index ead43f6b14bf9f5bf39030890f98faa228bdb982..d94ed7c1836595236a9905aa47acb4377fda4a72 100644 (file)
@@ -503,7 +503,9 @@ int sensor_listener::set_attribute(int attribute, int value)
        if (reply.header()->err < 0)
                return reply.header()->err;
 
-       update_attribute(attribute, value);
+       if (attribute != SENSORD_ATTRIBUTE_FLUSH) {
+               update_attribute(attribute, value);
+       }
 
        return OP_SUCCESS;
 }
index 397ab0e19bd444568b0c1a1a57da6e96b8cb40a2..59e76de16cc239c16e92bcbbc16e90e9023bc2fc 100644 (file)
@@ -92,8 +92,10 @@ static gboolean publish(gpointer gdata)
 
 static gboolean publish_batch_event(gpointer gdata)
 {
-       if (!started) return FALSE;
-
+       if (!started) {
+               _N("[ WAITING ] ...\n");
+               return TRUE;
+       }
        sensord_provider_h *provider = reinterpret_cast<sensord_provider_h *>(gdata);
 
        sensor_data_t data[NUMBER_OF_EVENT];