Fix wrong exception handling 97/236397/1
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 17 Jun 2020 00:07:25 +0000 (09:07 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 17 Jun 2020 00:07:25 +0000 (09:07 +0900)
Change-Id: Ifbf47c386293b2eacbe0888a3ead3d8039e4597c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/core/amd_app_status.c

index 96897ee0062c9d3cc6b7a05ee21c26d624c034c6..35e952fb3d0539b2f0c7201175af798ea26e4f34 100644 (file)
@@ -2221,7 +2221,7 @@ static int __dispatch_app_context_get(request_h req)
 
        app_status = _app_status_find_by_appid(appid,
                        _request_get_target_uid(req));
-       if (!_app_status_is_running(app_status)) {
+       if (_app_status_is_running(app_status) < 0) {
                _E("Failed to find app status. appid(%s)", appid);
                aul_sock_send_raw_with_fd(fd, -ENOENT, NULL, 0,
                                AUL_SOCK_NOREPLY);
@@ -2275,7 +2275,7 @@ static int __dispatch_app_context_get_by_instance_id(request_h req)
        pid = _request_get_pid(req);
        app_status = _app_status_find_by_instance_id(appid, instance_id,
                        _request_get_target_uid(req));
-       if (!_app_status_is_running(app_status) &&
+       if (_app_status_is_running(app_status) < 0 &&
                        _app_status_get_pid(app_status) != pid) {
                _E("Failed to find app status. appid(%s), inst_id(%s)",
                                appid, instance_id);
@@ -2321,7 +2321,7 @@ static int __dispatch_app_context_get_by_pid(request_h req)
        pid = atoi(pid_str);
 
        app_status = _app_status_find_v2(pid);
-       if (!_app_status_is_running(app_status) &&
+       if (_app_status_is_running(app_status) < 0 &&
                        _request_get_pid(req) != pid) {
                _E("Failed to find app status. pid(%d)", pid);
                aul_sock_send_raw_with_fd(fd, -ENOENT, NULL, 0,