From 9a6224c10b20255695def293f2c8d8a36b51fc45 Mon Sep 17 00:00:00 2001 From: "taemin.yeom" Date: Fri, 5 Mar 2021 16:55:06 +0900 Subject: [PATCH 1/1] Apply libsyscommon gdbus api improvement on error handling Change-Id: I5e2ec13609d15de410c3901b7bdc523dc47018c1 Signed-off-by: taemin.yeom --- src/runtime_info_usage.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/runtime_info_usage.c b/src/runtime_info_usage.c index f209cc9..4f2e7fa 100644 --- a/src/runtime_info_usage.c +++ b/src/runtime_info_usage.c @@ -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"); -- 2.7.4