diff options
author | Ilho Kim <ilho159.kim@samsung.com> | 2021-08-30 20:54:30 +0900 |
---|---|---|
committer | ilho kim <ilho159.kim@samsung.com> | 2021-08-31 09:42:10 +0000 |
commit | 248b6a4c457c5ff636d853a5d014cee78035e198 (patch) | |
tree | 5e33f958cbd560db2aee170469062c148b247631 | |
parent | ecaf7e03f98d0c419ab52c54032da81e894f1f05 (diff) | |
download | slp-pkgmgr-248b6a4c457c5ff636d853a5d014cee78035e198.tar.gz slp-pkgmgr-248b6a4c457c5ff636d853a5d014cee78035e198.tar.bz2 slp-pkgmgr-248b6a4c457c5ff636d853a5d014cee78035e198.zip |
Handle resource copy signal in signal agent
Change-Id: I1ecc54fa09c34f60bd4b51f82512aab5775735c9
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
-rw-r--r-- | installer/pkgmgr_installer_signal_agent.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/installer/pkgmgr_installer_signal_agent.c b/installer/pkgmgr_installer_signal_agent.c index ca70733..3adcc75 100644 --- a/installer/pkgmgr_installer_signal_agent.c +++ b/installer/pkgmgr_installer_signal_agent.c @@ -36,6 +36,7 @@ #include <dlog.h> #include "pkgmgr_installer_config.h" +#include "pkgmgr_installer_type.h" #ifdef LOG_TAG #undef LOG_TAG @@ -258,8 +259,16 @@ static gboolean __handle_signal(gint fd, GIOCondition cond, gpointer user_data) memcpy(data, buf + type_len, data_len); /* floating type GVariant instance */ - gv = g_variant_new_from_data(G_VARIANT_TYPE("(usa(sss)ss)"), data, - data_len, TRUE, NULL, NULL); + if (!strcmp(type_name, PKGMGR_INSTALLER_RES_COPY_EVENT_STR) || + !strcmp(type_name, PKGMGR_INSTALLER_RES_CREATE_DIR_EVENT_STR) || + !strcmp(type_name, PKGMGR_INSTALLER_RES_REMOVE_EVENT_STR) || + !strcmp(type_name, PKGMGR_INSTALLER_RES_UNINSTALL_EVENT_STR)) { + gv = g_variant_new_from_data(G_VARIANT_TYPE("(usssv)"), + data, data_len, TRUE, NULL, NULL); + } else { + gv = g_variant_new_from_data(G_VARIANT_TYPE("(usa(sss)ss)"), + data, data_len, TRUE, NULL, NULL); + } __emit_signal(type_name, gv); free(data); |