mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 06:00:18 +01:00
core/trivial: add code comment for nm_manager_get_best_device_for_connection()
(cherry picked from commit c37b028aba)
This commit is contained in:
parent
20f4c68fc6
commit
477cde3a10
1 changed files with 12 additions and 2 deletions
|
|
@ -3486,13 +3486,23 @@ found_better:
|
|||
|
||||
/* determine the priority of this device. Currently this priority is independent
|
||||
* of the profile (connection) and the device's details (aside the state).
|
||||
*
|
||||
* Maybe nm_device_check_connection_available() should instead return a priority,
|
||||
* as it has more information available. For now, that is not needed nor implemented. */
|
||||
* as it has more information available.
|
||||
*
|
||||
* For example, if you have multiple Wi-Fi devices, currently a user-request would
|
||||
* also select the device if the AP is not visible. Optimally, if one of the two
|
||||
* devices sees the AP and the other one doesn't, the former would be preferred.
|
||||
* For that, the priority would need to be determined by nm_device_check_connection_available(). */
|
||||
prio = _device_get_activation_prio (device);
|
||||
if ( prio <= best.prio
|
||||
&& best.device) {
|
||||
/* we already have a matching device with a better priority. This candidate
|
||||
* cannot be better. Skip the check. */
|
||||
* cannot be better. Skip the check.
|
||||
*
|
||||
* Also note, that below we collect the best error message @local_best.
|
||||
* Since we already have best.device, the error message does not matter
|
||||
* either, and we can skip nm_device_check_connection_available() altogether. */
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue