mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
icwmpd: 9.0.11
This commit is contained in:
parent
3039f3725e
commit
bda286a27d
3 changed files with 21 additions and 11 deletions
|
|
@ -8,11 +8,11 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=9.0.10
|
||||
PKG_VERSION:=9.0.11
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
|
||||
PKG_SOURCE_VERSION:=6de09d160a92098d3851eeebd72ce9b30b04d62e
|
||||
PKG_SOURCE_VERSION:=9a4840d83e0a5b5621354a79cc9e33489891dff9
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
|
|
|
|||
|
|
@ -14,15 +14,18 @@ handle_icwmp_update() {
|
|||
return 0
|
||||
fi
|
||||
|
||||
status="$(ubus call tr069 status |jsonfilter -qe '@.last_session.status')"
|
||||
if [ "$status" != "running" ]; then
|
||||
log "Trigger out of bound inform, since last inform status was failure"
|
||||
ubus -t 10 call tr069 inform >/dev/null 2>&1
|
||||
# Handle timeout or tr069 object not found
|
||||
if [ "$?" -eq 7 ] || [ "$?" -eq 4 ]; then
|
||||
log "Restarting icwmp tr069 object"
|
||||
/etc/init.d/icwmpd restart
|
||||
ret=$(ubus call service list '{"name":"icwmpd"}' | jsonfilter -qe '@.icwmpd.instances.icwmp.running')
|
||||
|
||||
if [ "$ret" == "true" ]; then
|
||||
# read status from var/state/cwmp
|
||||
status=$(uci -q -c /var/state get cwmp.sess_status.current_status)
|
||||
if [ "$status" != "running" ]; then
|
||||
log "Trigger out of bound inform, since last inform status was failure"
|
||||
ubus -t 10 call tr069 inform >/dev/null 2>&1
|
||||
fi
|
||||
else
|
||||
log "Restarting icwmp tr069 object"
|
||||
/etc/init.d/icwmpd restart
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -475,7 +475,14 @@ reload_service() {
|
|||
return 0
|
||||
fi
|
||||
|
||||
status="$(ubus -t 1 call tr069 status |jsonfilter -qe '@.cwmp.status')"
|
||||
tr069_status="$(ubus -t 1 call tr069 status)"
|
||||
ret="$?"
|
||||
if [ "$ret" = "7" ]; then
|
||||
# ubus timed out may be due to uloop is busy in some task so returning
|
||||
return 0
|
||||
fi
|
||||
|
||||
status="$(echo $tr069_status | jsonfilter -qe '@.cwmp.status')"
|
||||
ret="$?"
|
||||
if [ "$status" = "up" ]; then
|
||||
ubus -t 1 call tr069 command '{"command":"reload"}'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue