summaryrefslogtreecommitdiff
path: root/src/up-polkit.h
diff options
context:
space:
mode:
authorMatthias Clasen <matthias.clasen@gmail.com>2010-08-19 13:04:38 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2010-08-19 13:04:38 +0200
commit3967e062ef5a58c4f3f283f34d591c6e8a5d8788 (patch)
tree99ba577a7f76857c5871267077c0da86d7c6e556 /src/up-polkit.h
parentd815c491eb105c49a7dbcb29c355ca9aaa8d92c4 (diff)
Fix double D-BUS return in up_daemon_*_allowed
Do not send a D-BUS return message any more in up_polkit_is_allowed(), since this makes it hard for callers to ensure that they return exactly one result to the D-BUS caller. Instead, just pass a GError to the caller. Update up_daemon_suspend_allowed() and up_daemon_hibernate_allowed() accordingly, to always return either a result or an error. Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Diffstat (limited to 'src/up-polkit.h')
-rw-r--r--src/up-polkit.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/up-polkit.h b/src/up-polkit.h
index acee70e..1ddac58 100644
--- a/src/up-polkit.h
+++ b/src/up-polkit.h
@@ -60,7 +60,7 @@ gboolean up_polkit_check_auth (UpPolkit *polkit,
gboolean up_polkit_is_allowed (UpPolkit *polkit,
PolkitSubject *subject,
const gchar *action_id,
- DBusGMethodInvocation *context);
+ GError **error);
gboolean up_polkit_get_uid (UpPolkit *polkit,
PolkitSubject *subject,
uid_t *uid);