Add a command type to indicate that the listener is connected. 58/225258/1
authorBoram Bae <boram21.bae@samsung.com>
Tue, 18 Feb 2020 10:56:28 +0000 (19:56 +0900)
committerBoram Bae <boram21.bae@samsung.com>
Tue, 18 Feb 2020 11:00:46 +0000 (20:00 +0900)
Change-Id: I97775d6f9685294c06ac6551434c13a4cf1b3883
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
src/client/sensor_listener.cpp
src/server/server_channel_handler.cpp
src/shared/command_types.h

index d94ed7c..0c12928 100644 (file)
@@ -68,6 +68,9 @@ public:
                                m_listener->get_attribute_str_changed_handler()->read(ch, msg);
                        }
                } break;
+               case CMD_LISTENER_CONNECTED: {
+                       // Do nothing
+               } break;
                default:
                        _W("Invalid command message");
                }
index 3bec9cc..4f8abae 100644 (file)
@@ -158,6 +158,7 @@ int server_channel_handler::listener_connect(channel *ch, message &msg)
        buf.listener_id = listener_id;
 
        message reply;
+       reply.set_type(CMD_LISTENER_CONNECTED);
        reply.enclose((const char *)&buf, sizeof(buf));
        reply.header()->err = OP_SUCCESS;
 
index 7acf878..29aaf86 100644 (file)
@@ -49,6 +49,7 @@ enum cmd_type_e {
        CMD_LISTENER_GET_ATTR_INT,
        CMD_LISTENER_GET_ATTR_STR,
        CMD_LISTENER_GET_DATA_LIST,
+       CMD_LISTENER_CONNECTED,
 
        /* Provider */
        CMD_PROVIDER_CONNECT = 0x300,