From: Hyunho Kang Date: Wed, 2 Mar 2016 12:00:51 +0000 (+0900) Subject: Add dbus permission check logic X-Git-Tag: accepted/tizen/common/20160323.183814^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F48%2F60848%2F2;p=platform%2Fcore%2Fappfw%2Fshortcut.git Add dbus permission check logic Change-Id: I6a445fde00cd7c7a9d37e8688dc76a6c07192621 Signed-off-by: Hyunho Kang --- diff --git a/lib/src/shortcut_manager.c b/lib/src/shortcut_manager.c index 7cc6426..f993f90 100755 --- a/lib/src/shortcut_manager.c +++ b/lib/src/shortcut_manager.c @@ -259,11 +259,14 @@ static int _send_sync_shortcut(GVariant *body, GDBusMessage **reply, char *cmd) g_object_unref(msg); if (!*reply) { + ret = SHORTCUT_ERROR_COMM; if (err != NULL) { - ErrPrint("No reply. error = %s", err->message); + ErrPrint("No reply. cmd = %s, error = %s", cmd, err->message); + if (err->code == G_DBUS_ERROR_ACCESS_DENIED) + ret = SHORTCUT_ERROR_PERMISSION_DENIED; g_error_free(err); } - return SHORTCUT_ERROR_COMM; + return ret; } if (g_dbus_message_to_gerror(*reply, &err)) {