summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2018-04-16 14:32:06 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2018-04-17 10:17:25 +0200
commitd0563f0733ed293d67e9a0f6503e28c3f1c08f1b (patch)
treea96b3a19b66347f2423139a5f135d4915701f946
parent41e0ca68243f1342b38572c888c758f8d20b62cf (diff)
downloadNetworkManager-d0563f0733ed293d67e9a0f6503e28c3f1c08f1b.tar.gz
auth-manager: don't process idle calls when the proxy creation finishes
The list of calls contains two kinds of elements: (1) calls that don't need a D-Bus request and are only waiting for the asynchronous invocation of the callback in an idle function; (2) calls that need a D-Bus request and are waiting for the D-Bus proxy. When the proxy creation finishes, only (2) calls must be canceled (if the creation failed) or started (if the proxy was created). Fixes: 798b2a7527bddadcec37b48183da313fbc961e45 https://bugzilla.redhat.com/show_bug.cgi?id=1567807
-rw-r--r--src/nm-auth-manager.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/nm-auth-manager.c b/src/nm-auth-manager.c
index 6a8214c824..a7ba00de75 100644
--- a/src/nm-auth-manager.c
+++ b/src/nm-auth-manager.c
@@ -517,8 +517,10 @@ _dbus_new_proxy_cb (GObject *source_object,
_LOGE ("could not create polkit proxy: %s", error->message);
while ((call_id = c_list_first_entry (&priv->calls_lst_head, NMAuthManagerCallId, calls_lst))) {
- _LOG2T (call_id, "completed: failed due to no D-Bus proxy after startup");
- _call_id_invoke_callback (call_id, FALSE, FALSE, error);
+ if (call_id->dbus_parameters) {
+ _LOG2T (call_id, "completed: failed due to no D-Bus proxy after startup");
+ _call_id_invoke_callback (call_id, FALSE, FALSE, error);
+ }
}
return;
}
@@ -536,8 +538,10 @@ _dbus_new_proxy_cb (GObject *source_object,
_log_name_owner (self, NULL);
while ((call_id = c_list_first_entry (&priv->calls_lst_head, NMAuthManagerCallId, calls_lst))) {
- _LOG2T (call_id, "CheckAuthorization invoke now");
- _call_check_authorize (call_id);
+ if (call_id->dbus_parameters) {
+ _LOG2T (call_id, "CheckAuthorization invoke now");
+ _call_check_authorize (call_id);
+ }
}
_emit_changed_signal (self);