modified error handle tizen_2.1 submit/tizen_2.1/20130514.050907
authorJaeho Lee <jaeho81.lee@samsung.com>
Fri, 10 May 2013 06:05:29 +0000 (15:05 +0900)
committerJaeho Lee <jaeho81.lee@samsung.com>
Fri, 10 May 2013 06:05:29 +0000 (15:05 +0900)
Signed-off-by: Jaeho Lee <jaeho81.lee@samsung.com>
packaging/app-svc.spec
src/appsvc.c

index c1b4c0f..16a06d0 100644 (file)
@@ -1,6 +1,6 @@
 Name:      app-svc
 Summary:    App svc
-Version: 0.1.49
+Version: 0.1.50
 Release:    1
 Group:      System/Libraries
 License:    Apache License, Version 2.0
index af5c7a1..f4f5713 100755 (executable)
@@ -194,16 +194,22 @@ static int __run_svc_with_pkgname(char *pkgname, bundle *b, int request_code, ap
 
                cb_info = __create_rescb(request_code, cbfunc, data);
                ret = aul_launch_app_with_result(pkgname, b, __aul_cb, cb_info);
-               if(ret == AUL_R_EILLACC) {
-                       ret = APPSVC_RET_EILLACC;
-               } else if(ret < 0) {
-                       ret = APPSVC_RET_ELAUNCH;
-               }
        } else {
                _D("pkg_name : %s - no result", pkgname);
                ret = aul_launch_app(pkgname, b);
-               if(ret < 0)
-                       ret = APPSVC_RET_ELAUNCH;
+       }
+
+       if(ret < 0) {
+               switch (ret) {
+                       case AUL_R_EILLACC:
+                               ret = APPSVC_RET_EILLACC;
+                               break;
+                       case AUL_R_EINVAL:
+                               ret = APPSVC_RET_EINVAL;
+                               break;
+                       default:
+                               ret = APPSVC_RET_ELAUNCH;
+               }
        }
 
        return ret;