mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 18:50:07 +01:00
manager: return AC from nm_manager_get_best_device_for_connection()
This commit is contained in:
parent
b2f7f3950d
commit
237b878ce1
1 changed files with 8 additions and 1 deletions
|
|
@ -4537,6 +4537,7 @@ nm_manager_get_best_device_for_connection(NMManager *self,
|
|||
NMConnection *connection,
|
||||
gboolean for_user_request,
|
||||
GHashTable *exclude_devices,
|
||||
NMActiveConnection **out_device_ac,
|
||||
GError **error)
|
||||
{
|
||||
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE(self);
|
||||
|
|
@ -4562,6 +4563,8 @@ nm_manager_get_best_device_for_connection(NMManager *self,
|
|||
nm_assert(!connection || !sett_conn
|
||||
|| connection == nm_settings_connection_get_connection(sett_conn));
|
||||
|
||||
NM_SET_OUT(out_device_ac, NULL);
|
||||
|
||||
if (!connection)
|
||||
connection = nm_settings_connection_get_connection(sett_conn);
|
||||
|
||||
|
|
@ -4687,8 +4690,10 @@ found_better:
|
|||
}
|
||||
}
|
||||
|
||||
if (ac_device)
|
||||
if (ac_device) {
|
||||
NM_SET_OUT(out_device_ac, ac);
|
||||
return ac_device;
|
||||
}
|
||||
}
|
||||
|
||||
/* Pick the first device that's compatible with the connection. */
|
||||
|
|
@ -5342,6 +5347,7 @@ find_ports(NMManager *manager,
|
|||
NULL,
|
||||
for_user_request,
|
||||
devices,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
if (!ports) {
|
||||
|
|
@ -6521,6 +6527,7 @@ find_device_for_activation(NMManager *self,
|
|||
connection,
|
||||
TRUE,
|
||||
NULL,
|
||||
NULL,
|
||||
&local);
|
||||
if (!device) {
|
||||
gs_free char *iface = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue