update Xunlei Fast dick bandwith display as zero in some region

This commit is contained in:
coolsnowwolf 2018-10-09 20:10:11 +08:00
parent 9b5efe21f9
commit a3bc5bbcfa
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-xlnetacc
PKG_VERSION:=1.0.3
PKG_RELEASE:=8
PKG_RELEASE:=9
PKG_LICENSE:=GPLv2
PKG_MAINTAINER:=Sense <sensec@gmail.com>

View File

@ -413,7 +413,7 @@ isp_upgrade() {
local bandwidth
json_select "bandwidth" >/dev/null 2>&1
json_get_var bandwidth "downstream"
bandwidth=$(expr ${bandwidth:-0} / 1024)
[ ${bandwidth:=0} -ge 1024 ] && bandwidth=$(( $bandwidth / 1024 ))
local outmsg="${link_cn}提速成功,带宽已提升到 ${bandwidth}M"; _log "$outmsg" $(( 1 | $1 * 8 ))
[ $1 -eq 1 ] && down_acc=2 || up_acc=2
;;