From 94895ef110c139c284a87dcae07dfa0b8e043f8a Mon Sep 17 00:00:00 2001 From: suvendhu Date: Tue, 26 Dec 2023 12:07:22 +0530 Subject: [PATCH] icwmpd: Avoid process restart on ACS url change --- icwmp/Makefile | 4 ++-- icwmp/files/etc/init.d/icwmpd | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/icwmp/Makefile b/icwmp/Makefile index 8d527d4fe..af0c6af21 100755 --- a/icwmp/Makefile +++ b/icwmp/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=icwmp -PKG_VERSION:=9.5.31 +PKG_VERSION:=9.5.32 LOCAL_DEV:=0 ifneq ($(LOCAL_DEV),1) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git -PKG_SOURCE_VERSION:=ffa47ddf7387f50f0ff87e806d10f56a459f6f50 +PKG_SOURCE_VERSION:=07e083d07510d3e321a5ef093f9122e67f4f38e3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_MIRROR_HASH:=skip endif diff --git a/icwmp/files/etc/init.d/icwmpd b/icwmp/files/etc/init.d/icwmpd index 3df738929..7a91e0a33 100755 --- a/icwmp/files/etc/init.d/icwmpd +++ b/icwmp/files/etc/init.d/icwmpd @@ -575,6 +575,20 @@ reload_service() { log "Reloading cwmp service ..." stop start + return 0 + fi + + 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 return + log "Skipping ubus reload due to ubus timeout" + return 0 + fi + + status="$(echo "${tr069_status}" | jsonfilter -qe '@.cwmp.status')" + if [ "$status" = "up" ]; then + ubus -t 1 call tr069 command '{"command":"reload"}' fi }