[P170306-02321] wait for reply of prev aul_launch_app_for_uid before calling 25/118825/1
authorKyeonghun Lee <kh9090.lee@samsung.com>
Mon, 6 Mar 2017 11:06:08 +0000 (20:06 +0900)
committerKyeonghun Lee <kh9090.lee@samsung.com>
Tue, 14 Mar 2017 07:22:02 +0000 (00:22 -0700)
Change-Id: Ic2a546bc64040307b9943e604f2a007cce83fd00
Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
(cherry picked from commit 889fec29ab99c8999c1819b3278d3f9a73b19dbb)

utils/MsgUtilFunction.cpp

index fa8ff5a..d1fbc34 100755 (executable)
@@ -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;
 }