From: Kyeonghun Lee Date: Mon, 6 Mar 2017 11:06:08 +0000 (+0900) Subject: [P170306-02321] wait for reply of prev aul_launch_app_for_uid before calling X-Git-Tag: submit/tizen/20170328.034237~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=41d46f46a3d11ae37f3332724f08883355eb57af;p=platform%2Fcore%2Fmessaging%2Fmsg-service.git [P170306-02321] wait for reply of prev aul_launch_app_for_uid before calling Change-Id: Ic2a546bc64040307b9943e604f2a007cce83fd00 Signed-off-by: Kyeonghun Lee (cherry picked from commit 889fec29ab99c8999c1819b3278d3f9a73b19dbb) --- diff --git a/utils/MsgUtilFunction.cpp b/utils/MsgUtilFunction.cpp index fa8ff5a..d1fbc34 100755 --- a/utils/MsgUtilFunction.cpp +++ b/utils/MsgUtilFunction.cpp @@ -65,6 +65,8 @@ static int dpm_policy_enable[] = { static int phonenumberMinMatchDigit = -1; #endif +pthread_mutex_t mx; + /*================================================================================================== FUNCTION IMPLEMENTATION ==================================================================================================*/ @@ -1265,6 +1267,7 @@ uid_t msg_get_login_user() void* _msg_launch_app(void *data) { + pthread_mutex_lock(&mx); if (data) { msg_launch_app_data *ad = (msg_launch_app_data *)data; int ret = aul_launch_app_for_uid(ad->app_id, ad->bundle_data, msg_get_login_user()); @@ -1276,6 +1279,7 @@ void* _msg_launch_app(void *data) bundle_free(ad->bundle_data); g_free(ad); } + pthread_mutex_unlock(&mx); return NULL; }