summaryrefslogtreecommitdiff
path: root/src/nm-auth-manager.c
diff options
context:
space:
mode:
authorDan Winship <danw@redhat.com>2015-03-27 08:45:35 -0400
committerDan Winship <danw@redhat.com>2015-04-03 16:58:40 -0400
commit9926ba376ab65ade5ebb3d6bf0b2bb493c385562 (patch)
tree32d0729f54ff9a9cde0fb8bb7c919c3f3156ae00 /src/nm-auth-manager.c
parent9668bfd682dd3439e8b6b9ad249c3e2a8b95dbe2 (diff)
downloadNetworkManager-9926ba376ab65ade5ebb3d6bf0b2bb493c385562.tar.gz
libnm, core: use typechecked proxy_call methods
Diffstat (limited to 'src/nm-auth-manager.c')
-rw-r--r--src/nm-auth-manager.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/nm-auth-manager.c b/src/nm-auth-manager.c
index 4234e79055..3dd1511684 100644
--- a/src/nm-auth-manager.c
+++ b/src/nm-auth-manager.c
@@ -177,7 +177,7 @@ check_authorization_cb (GDBusProxy *proxy,
GVariant *value;
GError *error = NULL;
- value = g_dbus_proxy_call_finish (proxy, res, &error);
+ value = _nm_dbus_proxy_call_finish (proxy, res, G_VARIANT_TYPE ("((bba{ss}))"), &error);
if (value == NULL) {
if (data->cancellation_id != NULL &&
(!g_dbus_error_is_remote_error (error) &&
@@ -201,18 +201,15 @@ check_authorization_cb (GDBusProxy *proxy,
error->message);
g_error_free (error);
} else {
- GVariant *result_value;
CheckAuthorizationResult *result;
result = g_new0 (CheckAuthorizationResult, 1);
- result_value = g_variant_get_child_value (value, 0);
- g_variant_get (result_value,
- "(bb@a{ss})",
+ g_variant_get (value,
+ "((bb@a{ss}))",
&result->is_authorized,
&result->is_challenge,
NULL);
- g_variant_unref (result_value);
g_variant_unref (value);
_LOGD ("call[%u]: CheckAuthorization succeeded: (is_authorized=%d, is_challenge=%d)", data->call_id, result->is_authorized, result->is_challenge);