diff options
author | Thomas Haller <thaller@redhat.com> | 2018-10-17 12:21:49 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-10-17 15:06:52 +0200 |
commit | c37b028abad9105525a5f12dd833fe6592cd0b95 (patch) | |
tree | f77569f1363f95b9806c2c64b03525dcde3a340d | |
parent | 45913c11df17ced27996eb369414c8a827b3ca23 (diff) | |
download | NetworkManager-c37b028abad9105525a5f12dd833fe6592cd0b95.tar.gz |
core/trivial: add code comment for nm_manager_get_best_device_for_connection()
-rw-r--r-- | src/nm-manager.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c index 6f7b456c77..2714690b6b 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -3495,13 +3495,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; } |