summaryrefslogtreecommitdiff
path: root/src/up-polkit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/up-polkit.c')
-rw-r--r--src/up-polkit.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/up-polkit.c b/src/up-polkit.c
index 9b86394..ab2c66d 100644
--- a/src/up-polkit.c
+++ b/src/up-polkit.c
@@ -103,10 +103,9 @@ out:
* up_polkit_is_allowed:
**/
gboolean
-up_polkit_is_allowed (UpPolkit *polkit, PolkitSubject *subject, const gchar *action_id, DBusGMethodInvocation *context)
+up_polkit_is_allowed (UpPolkit *polkit, PolkitSubject *subject, const gchar *action_id, GError **error)
{
gboolean ret = FALSE;
- GError *error;
GError *error_local = NULL;
PolkitAuthorizationResult *result;
@@ -116,10 +115,8 @@ up_polkit_is_allowed (UpPolkit *polkit, PolkitSubject *subject, const gchar *act
POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE,
NULL, &error_local);
if (result == NULL) {
- error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "failed to check authorisation: %s", error_local->message);
- dbus_g_method_return_error (context, error);
+ g_set_error (error, UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "failed to check authorisation: %s", error_local->message);
g_error_free (error_local);
- g_error_free (error);
goto out;
}