#define APPFW_UID 301
+int processing_busy_cnt;
+
GMainLoop *app2sd_mainloop = NULL;
gboolean __exit_app2sd_server(void *data)
{
- _D("exit app2sd_server");
-
- g_main_loop_quit(app2sd_mainloop);
+ if (processing_busy_cnt <= 0) {
+ _D("exit app2sd_server");
+ g_main_loop_quit(app2sd_mainloop);
+ return FALSE;
+ }
- return FALSE;
+ _D("processing busy, count(%d)", processing_busy_cnt);
+ return TRUE;
}
static int __app2sd_get_sender_unixinfo(GDBusConnection *conn,
{
uid_t sender_uid = -1;
+ processing_busy_cnt++;
+
sender_uid = (uid_t)__app2sd_get_sender_uid(connection, sender);
if (g_strcmp0(method_name, "PreAppInstall") == 0) {
}
g_timeout_add_seconds(5, __exit_app2sd_server, NULL);
+ processing_busy_cnt--;
}
static const GDBusInterfaceVTable interface_vtable = {
return -1;
}
- /* add timer */
-
return 0;
}