From: Hyunho Kang Date: Wed, 2 Mar 2016 11:57:48 +0000 (+0900) Subject: Add dbus permission check logic X-Git-Tag: submit/tizen/20160315.050359~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=102f37fcd69bfc48325ec2ee8726e6042ce8c349;p=platform%2Fcore%2Fapi%2Fnotification.git Add dbus permission check logic Change-Id: I98408a58f7f96660aa1af62e9f6b61c405029b92 Signed-off-by: Hyunho Kang --- diff --git a/src/notification_ipc.c b/src/notification_ipc.c index 09787e72..eef8bf6b 100755 --- a/src/notification_ipc.c +++ b/src/notification_ipc.c @@ -579,11 +579,14 @@ static int _send_sync_noti(GVariant *body, GDBusMessage **reply, char *cmd) g_object_unref(msg); if (!*reply) { + ret = NOTIFICATION_ERROR_SERVICE_NOT_READY; if (err != NULL) { NOTIFICATION_ERR("No reply. cmd = %s, error = %s", cmd, err->message); + if (err->code == G_DBUS_ERROR_ACCESS_DENIED) + ret = NOTIFICATION_ERROR_PERMISSION_DENIED; g_error_free(err); } - return NOTIFICATION_ERROR_SERVICE_NOT_READY; + return ret; } if (g_dbus_message_to_gerror(*reply, &err)) {