diff options
author | Hyunho Kang <hhstark.kang@samsung.com> | 2016-03-02 20:57:48 +0900 |
---|---|---|
committer | Hyunho Kang <hhstark.kang@samsung.com> | 2016-03-02 20:58:23 +0900 |
commit | 102f37fcd69bfc48325ec2ee8726e6042ce8c349 (patch) | |
tree | 41de37bc4b0f39f26ceb2b08e7b8a6ae5f76dbd5 | |
parent | 304cf26ff0f0996f9e483be49ae71e6af674a88d (diff) | |
download | notification-102f37fcd69bfc48325ec2ee8726e6042ce8c349.tar.gz notification-102f37fcd69bfc48325ec2ee8726e6042ce8c349.tar.bz2 notification-102f37fcd69bfc48325ec2ee8726e6042ce8c349.zip |
Add dbus permission check logic
Change-Id: I98408a58f7f96660aa1af62e9f6b61c405029b92
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
-rwxr-xr-x | src/notification_ipc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/notification_ipc.c b/src/notification_ipc.c index 09787e7..eef8bf6 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)) { |