]> git.corax.cc Git - toolbox/commitdiff
net/iface: Print each AP only once
authorMatthias Kruk <m@m10k.eu>
Sat, 3 Apr 2021 04:15:00 +0000 (13:15 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 3 Apr 2021 04:15:00 +0000 (13:15 +0900)
A bug in _net_iface_parse_iwlist() caused found access points to be printed
multiple times. This commit fixes the bug, so that each access point is
printed only once.

include/net/iface.sh

index ef43792ff9c4c3800fde3c8ee5b25ffbbe1cb01e..fb7f07b35c69fdc5a488c1577f836f3624b233dc 100644 (file)
@@ -136,6 +136,7 @@ _net_iface_parse_iwlist() {
 
                 if [ -n "$ssid" ] && [ -n "$essid" ] && [ -n "$strength" ]; then
                         echo "$ssid $strength $essid"
+                       ssid=""
                 fi
         done
 }