To monitor the state of the launchpad, AMD will connect to the launchpad
and maintain the connection.
Change-Id: Ib8a9eaf30b4beaa1e40a0c46a7752c4b5e4ea86f
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
static io_channel_h __logger_channel;
static io_channel_h __label_monitor_channel;
static io_channel_h __launchpad_channel;
+static int __client_fd = -1;
static candidate_process_context_t *__add_slot(int type, int loader_id,
int caller_pid, const char *loader_name,
close(clifd);
clifd = -1;
goto end;
+ case PAD_CMD_CONNECT:
+ _W("Connected. fd(%d)", clifd);
+ if (__client_fd != -1)
+ close(__client_fd);
+
+ __client_fd = clifd;
+ clifd = -1;
+ goto end;
}
INIT_PERF(kb);
#define PAD_CMD_PING 15
#define PAD_CMD_UPDATE_APP_TYPE 16
#define PAD_CMD_PREPARE_APP_DEFINED_LOADER 17
+#define PAD_CMD_CONNECT 18
#define LAUNCHPAD_LAUNCH_SIGNAL 83
#define LAUNCHPAD_DEAD_SIGNAL 61