Browse Source

travelmate: bugfix 1.3.4

* fix runtime behaviour with empty scan results on radioX
* fix radiolist preparation (prevent dups)
* further optimize 'ProActive' mode

Signed-off-by: Dirk Brenken <dev@brenken.org>
lilik-openwrt-22.03
Dirk Brenken 6 years ago
parent
commit
2e93d26f51
2 changed files with 13 additions and 10 deletions
  1. +1
    -1
      net/travelmate/Makefile
  2. +12
    -9
      net/travelmate/files/travelmate.sh

+ 1
- 1
net/travelmate/Makefile View File

@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=travelmate
PKG_VERSION:=1.3.3
PKG_VERSION:=1.3.4
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>


+ 12
- 9
net/travelmate/files/travelmate.sh View File

@ -10,7 +10,7 @@
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
trm_ver="1.3.3"
trm_ver="1.3.4"
trm_sysver="unknown"
trm_enabled=0
trm_debug=0
@ -108,7 +108,7 @@ f_prep()
local disabled="$(uci_get wireless "${config}" disabled)"
local eaptype="$(uci_get wireless "${config}" eap_type)"
if [ -z "${trm_radio}" ] && [ -z "$(printf "%s" "${trm_radiolist}" | grep -Fo " ${radio}")" ]
if [ -z "${trm_radio}" ] && [ -z "$(printf "%s" "${trm_radiolist}" | grep -Fo "${radio}")" ]
then
trm_radiolist="$(f_trim "${trm_radiolist} ${radio}")"
elif [ -n "${trm_radio}" ] && [ -z "${trm_radiolist}" ]
@ -168,7 +168,7 @@ f_check()
for radio in ${trm_radiolist}
do
result="$(printf "%s" "${dev_status}" | jsonfilter -l1 -e "@.${radio}.up")"
if [ "${result}" = "true" ] && [ -z "$(printf "%s" "${trm_devlist}" | grep -Fo " ${radio}")" ]
if [ "${result}" = "true" ] && [ -z "$(printf "%s" "${trm_devlist}" | grep -Fo "${radio}")" ]
then
trm_devlist="$(f_trim "${trm_devlist} ${radio}")"
fi
@ -300,7 +300,7 @@ f_log()
f_main()
{
local IFS cnt dev config scan scan_list scan_essid scan_bssid scan_quality faulty_list
local sta sta_essid sta_bssid sta_radio sta_iface active_essid active_bssid active_radio active_prio
local sta sta_essid sta_bssid sta_radio sta_iface active_essid active_bssid active_radio
f_check "initial"
f_log "debug" "f_main ::: status: ${trm_ifstatus}, proactive: ${trm_proactive}"
@ -347,12 +347,10 @@ f_main()
f_log "debug" "f_main ::: faulty station '${sta_radio}/${sta_essid}/${sta_bssid:-"-"}' - continue"
continue
fi
if ([ "${dev}" = "${active_radio}" ] && [ "${sta_essid}" = "${active_essid}" ] && [ "${sta_bssid:-"-"}" = "${active_bssid}" ]) || \
([ "${dev}" != "${active_radio}" ] && [ "${active_prio}" = "true" ])
if [ "${dev}" = "${active_radio}" ] && [ "${sta_essid}" = "${active_essid}" ] && [ "${sta_bssid:-"-"}" = "${active_bssid}" ]
then
active_prio="true"
f_log "debug" "f_main ::: active station prioritized '${active_radio}/${active_essid}/${active_bssid:-"-"}' - continue"
continue 3
f_log "debug" "f_main ::: active station prioritized '${active_radio}/${active_essid}/${active_bssid:-"-"}' - break"
break 3
fi
if [ -z "${scan_list}" ]
then
@ -361,6 +359,11 @@ f_main()
if(var2==""){var2=$i}else{var2=var2" "$i}}/Quality:/{printf "%i,%s,%s\n",(100/$NF*$(NF-1)),var1,var2}' | \
sort -rn | awk '{ORS=",";print $0}')")"
f_log "debug" "f_main ::: scan_list: ${scan_list:0:800}"
if [ -z "${scan_list}" ]
then
f_log "debug" "f_main ::: no scan results on '${dev}' - continue"
continue 3
fi
fi
IFS=","
for scan in ${scan_list}


Loading…
Cancel
Save