manager: merge branch 'wl/device_auth_request_fix'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1716
This commit is contained in:
@@ -3222,6 +3222,13 @@ device_auth_done_cb(NMAuthChain *chain, GDBusMethodInvocation *context, gpointer
|
|||||||
nm_assert(error || (result == NM_AUTH_CALL_RESULT_YES));
|
nm_assert(error || (result == NM_AUTH_CALL_RESULT_YES));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!error && !nm_dbus_object_is_exported(NM_DBUS_OBJECT(device))) {
|
||||||
|
g_set_error(&error,
|
||||||
|
NM_MANAGER_ERROR,
|
||||||
|
NM_MANAGER_ERROR_UNKNOWN_DEVICE,
|
||||||
|
"device no longer exists");
|
||||||
|
}
|
||||||
|
|
||||||
callback(device, context, subject, error, nm_auth_chain_get_data(chain, "user-data"));
|
callback(device, context, subject, error, nm_auth_chain_get_data(chain, "user-data"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3287,6 +3294,14 @@ nm_manager_device_auth_request(NMManager *self,
|
|||||||
&error))
|
&error))
|
||||||
goto fail_on_idle;
|
goto fail_on_idle;
|
||||||
|
|
||||||
|
if (!nm_dbus_object_is_exported(NM_DBUS_OBJECT(device))) {
|
||||||
|
g_set_error(&error,
|
||||||
|
NM_MANAGER_ERROR,
|
||||||
|
NM_MANAGER_ERROR_UNKNOWN_DEVICE,
|
||||||
|
"device no longer exists");
|
||||||
|
goto fail_on_idle;
|
||||||
|
}
|
||||||
|
|
||||||
chain = nm_auth_chain_new_subject(subject, context, device_auth_done_cb, self);
|
chain = nm_auth_chain_new_subject(subject, context, device_auth_done_cb, self);
|
||||||
if (cancellable)
|
if (cancellable)
|
||||||
nm_auth_chain_set_cancellable(chain, cancellable);
|
nm_auth_chain_set_cancellable(chain, cancellable);
|
||||||
|
@@ -1662,15 +1662,14 @@ nm_policy_device_recheck_auto_activate_schedule(NMPolicy *self, NMDevice *device
|
|||||||
|
|
||||||
g_return_if_fail(NM_IS_POLICY(self));
|
g_return_if_fail(NM_IS_POLICY(self));
|
||||||
g_return_if_fail(NM_IS_DEVICE(device));
|
g_return_if_fail(NM_IS_DEVICE(device));
|
||||||
if (g_signal_handler_find(device,
|
nm_assert(g_signal_handler_find(device,
|
||||||
G_SIGNAL_MATCH_DATA,
|
G_SIGNAL_MATCH_DATA,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NM_POLICY_GET_PRIVATE(self))
|
NM_POLICY_GET_PRIVATE(self))
|
||||||
== 0)
|
!= 0);
|
||||||
return;
|
|
||||||
|
|
||||||
if (!c_list_is_empty(&device->policy_auto_activate_lst)) {
|
if (!c_list_is_empty(&device->policy_auto_activate_lst)) {
|
||||||
/* already queued. Return. */
|
/* already queued. Return. */
|
||||||
|
Reference in New Issue
Block a user