Apply libsyscommon gdbus api improvement on error handling 11/254611/1 accepted/tizen/unified/20210310.145038 submit/tizen/20210309.090957
authortaemin.yeom <taemin.yeom@samsung.com>
Fri, 5 Mar 2021 07:55:06 +0000 (16:55 +0900)
committertaemin.yeom <taemin.yeom@samsung.com>
Fri, 5 Mar 2021 07:55:06 +0000 (16:55 +0900)
Change-Id: I5e2ec13609d15de410c3901b7bdc523dc47018c1
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
src/runtime_info_usage.c

index f209cc9..4f2e7fa 100644 (file)
@@ -89,6 +89,7 @@ static GVariant *runtime_info_append_args(int *args, int size)
 static GVariant *runtime_info_dbus_request_usage_info(runtime_info_usage_type_e type,
                int *pid, int size, int *error)
 {
+       int ret;
        GVariant *args_in = NULL;
        GVariant *args_out = NULL;
        GVariant *usage;
@@ -153,13 +154,13 @@ static GVariant *runtime_info_dbus_request_usage_info(runtime_info_usage_type_e
 
        _D("Process %d: Sending dbus message to resourced for %s info",
                        getpid(), dbus_info[type].caption);
-       args_out = dbus_handle_method_sync_with_reply_var(RESOURCED_BUS_NAME,
+       ret = dbus_handle_method_sync_with_reply_var(RESOURCED_BUS_NAME,
                                RESOURCED_USAGE_OBJECT_NAME,
                                RESOURCED_USAGE_INTERFACE_NAME,
                                dbus_info[type].method_name,
-                               args_in);
+                               args_in, &args_out);
 
-       if (!args_out) {
+       if (ret < 0) {
                //LCOV_EXCL_START : system error
                _E("DBUS_METHOD_CALL: not able to send message");