From: Youngjae Shin Date: Fri, 27 Mar 2020 06:34:37 +0000 (+0900) Subject: fix gdbus error message X-Git-Tag: accepted/tizen/unified/20200406.074345~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=133c7b19fa62695de8063eb499abee14bdfbb378;p=platform%2Fcore%2Fsystem%2Fmodes.git fix gdbus error message --- diff --git a/client/mdsc_register_mode.c b/client/mdsc_register_mode.c index 15826bc..e630063 100644 --- a/client/mdsc_register_mode.c +++ b/client/mdsc_register_mode.c @@ -73,8 +73,8 @@ static GVariant* _mdsc_create_mode_data(modes_mode_h mode) while (NULL != it) { struct mds_action_handle *action_data = (struct mds_action_handle *)it->data; - g_variant_builder_add(action_builder, MODES_DBUS_ACTION_SIG, action_data->id, - action_data->rule, action_data->value); + g_variant_builder_add(action_builder, MODES_DBUS_ACTION_SIG, MODES_DBUS_SAFE_STR(action_data->id), + MODES_DBUS_SAFE_STR(action_data->rule), MODES_DBUS_SAFE_STR(action_data->value)); it = g_list_next(it); } diff --git a/common/dbus_def.h b/common/dbus_def.h index ae922bb..21486ef 100644 --- a/common/dbus_def.h +++ b/common/dbus_def.h @@ -28,3 +28,5 @@ #define MODES_DBUS_GET_MODES_MODE_SIG "(sii)" #define MODES_DBUS_GET_MODES_SIG "a" MODES_DBUS_GET_MODES_MODE_SIG + +#define MODES_DBUS_SAFE_STR(x) x ? x : ""