summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunghoon Park <jh9216.park@samsung.com>2016-01-20 11:32:29 +0900
committerJunghoon Park <jh9216.park@samsung.com>2016-01-20 11:32:29 +0900
commit3883458c69c6507490336742bc63a2a7fd78d58d (patch)
tree8fc9c53b78dc4f3a2eaeff3f701eddb1a826790f
parentcb6057f6e25fd89724fae6c50861c7616f1b7669 (diff)
downloadlaunchpad-3883458c69c6507490336742bc63a2a7fd78d58d.tar.gz
launchpad-3883458c69c6507490336742bc63a2a7fd78d58d.tar.bz2
launchpad-3883458c69c6507490336742bc63a2a7fd78d58d.zip
Change-Id: Id904e2c46822729b0e154ba93043830c9c7b3b20 Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
-rw-r--r--inc/launchpad_common.h1
-rwxr-xr-xsrc/launchpad.c13
2 files changed, 9 insertions, 5 deletions
diff --git a/inc/launchpad_common.h b/inc/launchpad_common.h
index 3659583..81ec73e 100644
--- a/inc/launchpad_common.h
+++ b/inc/launchpad_common.h
@@ -40,6 +40,7 @@
#define PAD_CMD_VISIBILITY 10
#define PAD_CMD_ADD_LOADER 11
#define PAD_CMD_REMOVE_LOADER 12
+#define PAD_CMD_MAKE_DEFAULT_SLOTS 13
#define PAD_LOADER_ID_STATIC 0
#define PAD_LOADER_ID_DIRECT 1
diff --git a/src/launchpad.c b/src/launchpad.c
index 60de1e3..aaaeee6 100755
--- a/src/launchpad.c
+++ b/src/launchpad.c
@@ -70,6 +70,7 @@ typedef struct {
static GList *candidate_slot_list;
static candidate_process_context_t* __add_slot(int type, int loader_id, int caller_pid, const char *loader_path);
static int __remove_slot(int type, int loader_id);
+static int __add_default_slots();
static int __make_loader_id()
{
@@ -908,6 +909,13 @@ static gboolean __handle_launch_event(gpointer data)
__real_send(clifd, ret);
clifd = -1;
goto end;
+ case PAD_CMD_MAKE_DEFAULT_SLOTS:
+ ret = __add_default_slots();
+ if (ret != 0)
+ _E("Failed to make default slots");
+ __real_send(clifd, ret);
+ clifd = -1;
+ goto end;
}
INIT_PERF(kb);
@@ -1147,11 +1155,6 @@ static int __before_loop(int argc, char **argv)
return -1;
}
- if (__add_default_slots() != 0) {
- _E("__add_default_slots() failed");
- return -1;
- }
-
return 0;
}