Fix the exception handling about app_control_send_launch_request API 08/72008/1 accepted/tizen/common/20160602.140057 accepted/tizen/ivi/20160602.022857 accepted/tizen/mobile/20160602.023030 accepted/tizen/tv/20160602.022605 accepted/tizen/wearable/20160602.022745 submit/tizen/20160531.024853
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 30 May 2016 07:25:34 +0000 (16:25 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 30 May 2016 07:25:34 +0000 (16:25 +0900)
Change-Id: I300b03a1a2ca18f820d2f83400ae56b28ecd0e13
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
app_control/app_control.c

index f7b8ec6..b323f30 100644 (file)
@@ -687,6 +687,7 @@ int app_control_send_launch_request(app_control_h app_control, app_control_reply
        bool implicit_default_operation = false;
        int launch_pid;
        app_control_request_context_h request_context = NULL;
+       int ret;
 
        if (app_control_validate(app_control))
                return app_control_error(APP_CONTROL_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
@@ -719,9 +720,10 @@ int app_control_send_launch_request(app_control_h app_control, app_control_reply
 
                request_context->reply_cb = callback;
 
-               if (app_control_clone(&request_clone, app_control) != APP_CONTROL_ERROR_NONE) {
+               ret = app_control_clone(&request_clone, app_control);
+               if (ret != APP_CONTROL_ERROR_NONE) {
                        free(request_context);
-                       return app_control_error(APP_CONTROL_ERROR_INVALID_PARAMETER, __FUNCTION__, "failed to clone the app_control request handle");
+                       return app_control_error(ret, __FUNCTION__, "failed to clone the app_control request handle");
                }
 
                request_context->app_control = request_clone;