Skip to content
Snippets Groups Projects
Commit 5eb08e95 authored by Kenneth Johansson's avatar Kenneth Johansson
Browse files

dsl-cpe-control-vrx: update from ugw 8.1.1

parent 539119be
Branches
Tags
No related merge requests found
...@@ -22,21 +22,25 @@ menu "Configuration" ...@@ -22,21 +22,25 @@ menu "Configuration"
config dsl-cpe-control-vrx_MODEL_FOOTPRINT config dsl-cpe-control-vrx_MODEL_FOOTPRINT
bool "Footprint" bool "Footprint"
select dsl-cpe-control-vrx_DTI
help help
Defined for low footprint applications. Defined for low footprint applications.
config dsl-cpe-control-vrx_MODEL_TYPICAL config dsl-cpe-control-vrx_MODEL_TYPICAL
bool "Typical" bool "Typical"
select dsl-cpe-control-vrx_DTI
help help
Defined for most typical use. Defined for most typical use.
config dsl-cpe-control-vrx_MODEL_FULL config dsl-cpe-control-vrx_MODEL_FULL
bool "Full" bool "Full"
select dsl-cpe-control-vrx_DTI
help help
Includes all features but NOT all debug functionalities. Includes all features but NOT all debug functionalities.
config dsl-cpe-control-vrx_MODEL_DEBUG config dsl-cpe-control-vrx_MODEL_DEBUG
bool "Debug" bool "Debug"
select dsl-cpe-control-vrx_DTI
help help
Includes all features AND debug functionalities. Includes all features AND debug functionalities.
endchoice endchoice
......
...@@ -10,9 +10,9 @@ include $(INCLUDE_DIR)/kernel.mk ...@@ -10,9 +10,9 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=dsl-cpe-control-vrx PKG_NAME:=dsl-cpe-control-vrx
PKG_VERSION:=4.19.3 PKG_VERSION:=4.20.1.2
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=8f1931ab2ead6a737d305066792744b6d4ec4084 PKG_SOURCE_VERSION:=114b68c50f0e2b52af61fdf0ea2de29e55b64495
#PKG_MD5SUM:=85d293ee43f01ba367301a7fe7c46156 #PKG_MD5SUM:=85d293ee43f01ba367301a7fe7c46156
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_BASE_NAME:=dsl_cpe_control_vrx PKG_BASE_NAME:=dsl_cpe_control_vrx
...@@ -25,6 +25,10 @@ DSL_BIN_DIR=$(VENDOR_PATH)/bin ...@@ -25,6 +25,10 @@ DSL_BIN_DIR=$(VENDOR_PATH)/bin
DSL_INITD_DIR=$(VENDOR_PATH)/etc/init.d DSL_INITD_DIR=$(VENDOR_PATH)/etc/init.d
DSL_FW_DIR=$(VENDOR_PATH)/firmware DSL_FW_DIR=$(VENDOR_PATH)/firmware
ifeq (y,$(CONFIG_dsl-cpe-mei-vrx_DTM_STANDALONE))
STARTSEQ = 22
endif
PKG_FIXUP:=autoreconf PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
...@@ -57,24 +61,23 @@ endif ...@@ -57,24 +61,23 @@ endif
define Package/dsl-cpe-control define Package/dsl-cpe-control
SECTION:=application SECTION:=application
CATEGORY:=Intel CATEGORY:=Lantiq
SUBMENU:=DSL Subsystem SUBMENU:=DSL Subsystem
TITLE:=DSL CPE control application for VRX Family TITLE:=DSL CPE control application for VRX Family
URL:=http://www.intel.com/ URL:=http://www.lantiq.com/
MAINTAINER:=Intel Corporation MAINTAINER:=Lantiq Beteiligungs-GmbH & Co. KG
PROVIDES:=dsl-cpe-control PROVIDES:=dsl-cpe-control
DEPENDS:= +libugwhelper DEPENDS:= +libugwhelper
MENU:=1 MENU:=1
endef endef
define Package/dsl-cpe-control/description define Package/dsl-cpe-control/description
Intel DSL CPE for Amazon SE, Danube,Vinax and VRx. Lantiq DSL CPE for Amazon SE, Danube,Vinax and VRx.
endef endef
define Package/$(PKG_NAME) define Package/$(PKG_NAME)
$(call Package/dsl-cpe-control) $(call Package/dsl-cpe-control)
DEPENDS:= +dsl-cpe-api-vrx +libpthread +librt +lib-dti DEPENDS:= +dsl-cpe-api-vrx +libpthread +librt +lib-dti +(LANTIQ_OPENWRT_FIRMWARE):libscapi
#DEPENDS:= +dsl-cpe-api-vrx +libpthread +librt
endef endef
define Package/$(PKG_NAME)/description define Package/$(PKG_NAME)/description
...@@ -112,8 +115,6 @@ CONFIGURE_ARGS += \ ...@@ -112,8 +115,6 @@ CONFIGURE_ARGS += \
CONFIGURE_ARGS += \ CONFIGURE_ARGS += \
--enable-dti-include="-I$(STAGING_DIR)/usr/include/dti" \ --enable-dti-include="-I$(STAGING_DIR)/usr/include/dti" \
--enable-dti-library="-L$(STAGING_DIR)/usr/lib" --enable-dti-library="-L$(STAGING_DIR)/usr/lib"
else
CONFIGURE_ARGS += --enable-dti=no
endif endif
ifeq ($(CONFIG_LTQ_CLI),y) ifeq ($(CONFIG_LTQ_CLI),y)
...@@ -130,8 +131,6 @@ else ifeq ($(CONFIG_dsl-cpe-mei-vrx_DEVICE_VR10),y) ...@@ -130,8 +131,6 @@ else ifeq ($(CONFIG_dsl-cpe-mei-vrx_DEVICE_VR10),y)
CONFIGURE_ARGS += --enable-vrx-device=vr10 CONFIGURE_ARGS += --enable-vrx-device=vr10
else ifeq ($(CONFIG_dsl-cpe-mei-vrx_DEVICE_VR10_320),y) else ifeq ($(CONFIG_dsl-cpe-mei-vrx_DEVICE_VR10_320),y)
CONFIGURE_ARGS += --enable-vrx-device=vr10_320 CONFIGURE_ARGS += --enable-vrx-device=vr10_320
else ifeq ($(CONFIG_dsl-cpe-mei-vrx_DEVICE_VR11),y)
CONFIGURE_ARGS += --enable-vrx-device=vr11
else else
CONFIGURE_ARGS += --enable-vrx-device=vr9 CONFIGURE_ARGS += --enable-vrx-device=vr9
endif endif
...@@ -198,10 +197,13 @@ define Package/$(PKG_NAME)/install ...@@ -198,10 +197,13 @@ define Package/$(PKG_NAME)/install
$(SED) "s:@dsl_fw_dir@:$(DSL_FW_DIR):g" $(1)/$(DSL_INITD_DIR)/ltq_cpe_control_init.sh $(SED) "s:@dsl_fw_dir@:$(DSL_FW_DIR):g" $(1)/$(DSL_INITD_DIR)/ltq_cpe_control_init.sh
$(SED) "s:@model_name@:$(MODEL_NAME):g" $(1)/$(DSL_INITD_DIR)/ltq_cpe_control_init.sh $(SED) "s:@model_name@:$(MODEL_NAME):g" $(1)/$(DSL_INITD_DIR)/ltq_cpe_control_init.sh
ifeq ($(CONFIG_dsl-cpe-mei-vrx_DTM_STANDALONE),y) ifneq (y,$(CONFIG_NEW_FRAMEWORK))
ifeq (y,$(CONFIG_dsl-cpe-mei-vrx_DTM_STANDALONE))
$(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/ltq_cpe_control_init_standalone.sh $(1)/etc/init.d/ $(INSTALL_BIN) ./files/ltq_cpe_control_init_standalone.sh $(1)/etc/init.d/
$(SED) "s:@dsl_init_dir@:$(DSL_INITD_DIR):g" $(1)/etc/init.d/ltq_cpe_control_init_standalone.sh $(SED) "s:@dsl_init_dir@:$(DSL_INITD_DIR):g" $(1)/etc/init.d/ltq_cpe_control_init_standalone.sh
$(SED) "s:@start_seq@:$(STARTSEQ):g" $(1)/etc/init.d/ltq_cpe_control_init_standalone.sh
endif
endif endif
$(INSTALL_DIR) $(1)/etc/profile.d $(INSTALL_DIR) $(1)/etc/profile.d
...@@ -228,7 +230,7 @@ endif ...@@ -228,7 +230,7 @@ endif
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dsl_cpe_control $(1)/$(DSL_BIN_DIR) $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dsl_cpe_control $(1)/$(DSL_BIN_DIR)
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/pipe/dsl_cpe_pipe $(1)/$(DSL_BIN_DIR) $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/pipe/dsl_cpe_pipe $(1)/$(DSL_BIN_DIR)
ln -snf dsl_cpe_pipe $(1)/$(DSL_BIN_DIR)/dsl_cpe_pipe.sh ln -snf dsl_cpe_pipe $(1)/$(DSL_BIN_DIR)/dsl_cpe_pipe.sh
$(if $(CONFIG_LANTIQ_OPENWRT_FIRMWARE), \ $(if $(CONFIG_LANTIQ_OPENWRT_FIRMWARE), \
$(INSTALL_DIR) $(1)/etc/init.d/; \ $(INSTALL_DIR) $(1)/etc/init.d/; \
$(INSTALL_BIN) ./files/xdsl.init $(1)/etc/init.d/xdsl; \ $(INSTALL_BIN) ./files/xdsl.init $(1)/etc/init.d/xdsl; \
......
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
# Copyright (C) 2015 OpenWrt.org # Copyright (C) 2015 OpenWrt.org
exec > /dev/console
xTSE="" xTSE=""
LINE_SET="" LINE_SET=""
LINE_GET="" LINE_GET=""
...@@ -25,20 +26,19 @@ eval $( cat /proc/driver/mei_cpe/devinfo ) ...@@ -25,20 +26,19 @@ eval $( cat /proc/driver/mei_cpe/devinfo )
xDSL_AutoCfg_Bonding=$(( $MaxDeviceNumber * $LinesPerDevice > 1 )) xDSL_AutoCfg_Bonding=$(( $MaxDeviceNumber * $LinesPerDevice > 1 ))
status=0 status=0
wait_for_dsl_process() wait_for_dsl_process() {
{ retrycnt=10
retrycnt=10 i=1
i=1 while [ $i -le $retrycnt ]
while [ $i -le $retrycnt ] do
do PS=`ps`
PS=`ps` echo $PS | grep -q dsl_cpe_control &>/dev/null && {
echo $PS | grep -q dsl_cpe_control &>/dev/null && { status=1
status=1 return
return }
} let i++
let i++ sleep 1
sleep 1 done
done
} }
if [ ! "$CONFIGLOADED" ]; then if [ ! "$CONFIGLOADED" ]; then
...@@ -81,7 +81,7 @@ fi ...@@ -81,7 +81,7 @@ fi
# 0: One or both lines does not reach defined linestate (from $1) # 0: One or both lines does not reach defined linestate (from $1)
# 1: Both lines have reached defined linestate (from $1) # 1: Both lines have reached defined linestate (from $1)
wait_for_firmware_ready() { wait_for_firmware_ready() {
nTimeout=$1 nTimeout=$(($1 * 2))
nTimeoutInit=$nTimeout nTimeoutInit=$nTimeout
while [ $nTimeout -gt 0 ] while [ $nTimeout -gt 0 ]
...@@ -121,7 +121,7 @@ wait_for_firmware_ready() { ...@@ -121,7 +121,7 @@ wait_for_firmware_ready() {
break break
fi fi
nTimeout=`expr $nTimeout - 1` nTimeout=`expr $nTimeout - 1`
sleep 1; usleep 500000;
done done
} }
...@@ -410,6 +410,7 @@ start() { ...@@ -410,6 +410,7 @@ start() {
case "$xDSL_Dbg_DebugAndTestInterfaces" in case "$xDSL_Dbg_DebugAndTestInterfaces" in
"0") "0")
# Do not use interfaces, empty string is anyhow default (just in case) # Do not use interfaces, empty string is anyhow default (just in case)
DBG_TEST_IF=""
DTI_IF_STR="" DTI_IF_STR=""
TCPM_IF_STR="" TCPM_IF_STR=""
;; ;;
...@@ -433,8 +434,9 @@ start() { ...@@ -433,8 +434,9 @@ start() {
;; ;;
"2") "2")
# Use all interfaces for debug and test communication # Use all interfaces for debug and test communication
DTI_IF_STR="-d0.0.0.0" DBG_TEST_IF="0.0.0.0"
TCPM_IF_STR="-t0.0.0.0" DTI_IF_STR="-d${DBG_TEST_IF}"
TCPM_IF_STR="-t${DBG_TEST_IF}"
;; ;;
esac esac
...@@ -442,6 +444,15 @@ start() { ...@@ -442,6 +444,15 @@ start() {
DTI_IF="${DTI_IF_STR}" DTI_IF="${DTI_IF_STR}"
} }
# Start DTI standalone agent if available (currently only in case of binding
# to all interfaces is configured because binding to a specific LAN port
# IP address does not work correctly)
if [ "$xDSL_Dbg_DebugAndTestInterfaces" = "2" ]; then
if [ -e ${xDSL_BinDir}/dsl_cpe_dti_agent ]; then
${xDSL_BinDir}/dsl_cpe_dti_agent -l ${LinesPerDevice} -d ${MaxDeviceNumber} -D 1 -p 9001 -a ${DBG_TEST_IF} &
fi
fi
echo `${xDSL_BinDir}/dsl_cpe_control -h` | grep -q "(-t)" && { echo `${xDSL_BinDir}/dsl_cpe_control -h` | grep -q "(-t)" && {
TCPM_IF="${TCPM_IF_STR}" TCPM_IF="${TCPM_IF_STR}"
} }
...@@ -537,7 +548,8 @@ start() { ...@@ -537,7 +548,8 @@ start() {
${DSL_FIRMWARE_2P} ${XDSL_MULTIMODE} ${XTM_MULTIMODE} ${AUTOBOOT_VDSL} \ ${DSL_FIRMWARE_2P} ${XDSL_MULTIMODE} ${XTM_MULTIMODE} ${AUTOBOOT_VDSL} \
${AUTOBOOT_ADSL} ${NOTIFICATION_SCRIPT} ${TCPM_IF} ${DTI_IF} \ ${AUTOBOOT_ADSL} ${NOTIFICATION_SCRIPT} ${TCPM_IF} ${DTI_IF} \
${ACTIVATION_CFG} ${REMEMBER_CFG} ${DEVICE_LAYOUT} & ${ACTIVATION_CFG} ${REMEMBER_CFG} ${DEVICE_LAYOUT} &
wait_for_dsl_process
wait_for_dsl_process
# Timeout to wait for dsl_cpe_control startup [in seconds] # Timeout to wait for dsl_cpe_control startup [in seconds]
iLp=10 iLp=10
...@@ -545,7 +557,7 @@ start() { ...@@ -545,7 +557,7 @@ start() {
# workaround for nfs: allow write to pipes for non-root # workaround for nfs: allow write to pipes for non-root
while [ ! -e /tmp/pipe/dsl_cpe${xDSL_MaxPipeIdx}_ack -a $iLp -gt 0 ] ; do while [ ! -e /tmp/pipe/dsl_cpe${xDSL_MaxPipeIdx}_ack -a $iLp -gt 0 ] ; do
iLp=`expr $iLp - 1` iLp=`expr $iLp - 1`
sleep 1; usleep 500000;
done done
if [ ${iLp} -le 0 ]; then if [ ${iLp} -le 0 ]; then
...@@ -590,7 +602,7 @@ start() { ...@@ -590,7 +602,7 @@ start() {
fi fi
fi fi
sleep 1; usleep 500000;
#Init BitSwap config #Init BitSwap config
nDslMode="ADSL VDSL" nDslMode="ADSL VDSL"
...@@ -971,7 +983,7 @@ start() { ...@@ -971,7 +983,7 @@ start() {
;; ;;
"8") "8")
# Currently the BAR13 configuration is not used (just reserved) # Currently the BAR13 configuration is not used (just reserved)
;; ;;
*) *)
echo "${xDSL_CtrlAppName}: US-ReTx: BAR13 *not* configured (unknown PlatformID)!!!" echo "${xDSL_CtrlAppName}: US-ReTx: BAR13 *not* configured (unknown PlatformID)!!!"
;; ;;
...@@ -1026,8 +1038,11 @@ start() { ...@@ -1026,8 +1038,11 @@ start() {
fi fi
fi fi
# Switch back to polling mode until fixes for event handling (DSLCPE_SW-1118) are included # Test and Debug configuration only: Switch back to polling mode if configured within dsl.cfg
${xDSL_BinDir}/dsl_cpe_pipe.sh ics $LINE_SET 1 0 0 if [ "$xDSL_Dbg_FwMsgPollingOnly" = "1" ]; then
echo "${xDSL_CtrlAppName}: TestCfg: xDSL_Dbg_FwMsgPollingOnly=$xDSL_Dbg_FwMsgPollingOnly"
${xDSL_BinDir}/dsl_cpe_pipe.sh ics $LINE_SET 1 0 0
fi
${xDSL_BinDir}/dsl_cpe_pipe.sh acs $LINE_SET 1 ${xDSL_BinDir}/dsl_cpe_pipe.sh acs $LINE_SET 1
else else
...@@ -1042,15 +1057,91 @@ stop() { ...@@ -1042,15 +1057,91 @@ stop() {
. ${xDSL_BinDir}/dsl.cfg 2> /dev/null . ${xDSL_BinDir}/dsl.cfg 2> /dev/null
fi fi
if [ "${xDSL_Cfg_LdAfeShutdown}" == "1" ]; then if [ ${xDSL_AutoCfg_Bonding} = 1 ]; then
${xDSL_BinDir}/dsl_cpe_pipe.sh acs $LINE_SET 7 sLineNumsToDisable="1 0"
sleep 3
${xDSL_BinDir}/dsl_cpe_pipe.sh quit $LINE_SET
else else
${xDSL_BinDir}/dsl_cpe_pipe.sh acos $LINE_SET 1 1 1 0 0 0 sLineNumsToDisable="0"
${xDSL_BinDir}/dsl_cpe_pipe.sh acs $LINE_SET 2 fi
sleep 3 bDisableAllLines=1
${xDSL_BinDir}/dsl_cpe_pipe.sh acs $LINE_SET 0
# from SL via dsl_web.cfg
if [ "${xDSL_Cfg_EntitiesEnabledSet}" == "" ]; then
#reset it to 0 when dsl webcfg not found as its duplicate variable from
#mei_cpe/devinfo and getting exported
EntitiesEnabled=0
if [ -r /tmp/dsl_web.cfg ]; then
. /tmp/dsl_web.cfg 2> /dev/null
fi
# all lines will be operated
if [ "${EntitiesEnabled}" == "2" ]; then
sLineNumsToDisable=""
bDisableAllLines=0
# one line will be operated
elif [ "${EntitiesEnabled}" == "1" ]; then
bDisableAllLines=0
if [ ${xDSL_AutoCfg_Bonding} = 1 ]; then
sLineNumsToDisable="1"
else
sLineNumsToDisable=""
fi
# none lines will be operated
else
:
fi
# from dsl.cfg
else
# all lines will be operated
if [ "${xDSL_Cfg_EntitiesEnabledSet}" == "0" ] ||
([ "${xDSL_Cfg_EntitiesEnabledSet}" == "1" ] && [ "${xDSL_Cfg_EntitiesEnabledSelect}" == "2" ]); then
sLineNumsToDisable=""
bDisableAllLines=0
# one line will be operated
elif [ "${xDSL_Cfg_EntitiesEnabledSet}" == "1" ] && [ "${xDSL_Cfg_EntitiesEnabledSelect}" == "1" ]; then
bDisableAllLines=0
if [ ${xDSL_AutoCfg_Bonding} = 1 ]; then
sLineNumsToDisable="1"
else
sLineNumsToDisable=""
fi
# none lines will be operated
else
:
fi
fi
for line in $sLineNumsToDisable; do
echo "${xDSL_CtrlAppName}: stop(): line[${line}]"
if [ ${xDSL_AutoCfg_Bonding} -ne 1 ]; then
# backward-compatibility
line=""
fi
if [ "${xDSL_Cfg_LdAfeShutdown}" == "1" ]; then
${xDSL_BinDir}/dsl_cpe_pipe.sh acs $line 7
sleep 3
else
${xDSL_BinDir}/dsl_cpe_pipe.sh acos $line 1 1 1 0 0 0
${xDSL_BinDir}/dsl_cpe_pipe.sh acs $line 2
sleep 3
${xDSL_BinDir}/dsl_cpe_pipe.sh acs $line 0
fi
done
if [ ${bDisableAllLines} -eq 1 ]; then
${xDSL_BinDir}/dsl_cpe_pipe.sh quit $LINE_SET ${xDSL_BinDir}/dsl_cpe_pipe.sh quit $LINE_SET
fi fi
} }
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
# It will/shall be only used in case of DSL related components from the # It will/shall be only used in case of DSL related components from the
# UGW framework (FAPI/SL) are NOT used/included. # UGW framework (FAPI/SL) are NOT used/included.
START=22 START=@start_seq@
initd_dir=@dsl_init_dir@ initd_dir=@dsl_init_dir@
start() { start() {
......
diff -Naur org/configure.in new/configure.in
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
AC_REVISION($Revision: 1.173 $)
-AC_INIT([DSL CPE Control application],[4.19.3],[],[dsl_cpe_control])
+AC_INIT([DSL CPE Control application],[4.19.3-pa1],[],[dsl_cpe_control])
AC_CONFIG_SRCDIR(src/Makefile.am)
AM_INIT_AUTOMAKE([tar-pax])
diff -Naur org/src/dsl_cpe_bnd_vrx.c new/src/dsl_cpe_bnd_vrx.c
--- org/src/dsl_cpe_bnd_vrx.c
+++ new/src/dsl_cpe_bnd_vrx.c
@@ -477,24 +477,27 @@ DSL_Error_t DSL_CPE_BND_SystemInterfaceStatusHandle(
nLine = (pBndCtx->nPafLineHandled == nOppositeLine) ? nCurrentLine :
nOppositeLine;
- memset(&nAcs, 0x0, sizeof(DSL_AutobootControl_t));
- nAcs.data.nCommand = DSL_AUTOBOOT_CTRL_DISABLE;
-
- nErrorCode = DSL_CPE_Ioctl(pBndCtx->pCtrlCtx->fd[nLine],
- DSL_FIO_AUTOBOOT_CONTROL_SET, (DSL_int_t) &nAcs);
- if ((nErrorCode < 0) || (nAcs.accessCtl.nReturn < DSL_SUCCESS))
+ if (nLine != nCurrentLine)
{
- DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
- "DSL_FIO_AUTOBOOT_CONTROL_SET ioctl call failed!" DSL_CPE_CRLF));
+ memset(&nAcs, 0x0, sizeof(DSL_AutobootControl_t));
+ nAcs.data.nCommand = DSL_AUTOBOOT_CTRL_DISABLE;
- return DSL_ERROR;
- }
+ nErrorCode = DSL_CPE_Ioctl(pBndCtx->pCtrlCtx->fd[nLine],
+ DSL_FIO_AUTOBOOT_CONTROL_SET, (DSL_int_t) &nAcs);
+ if ((nErrorCode < 0) || (nAcs.accessCtl.nReturn < DSL_SUCCESS))
+ {
+ DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX
+ "DSL_FIO_AUTOBOOT_CONTROL_SET ioctl call failed!" DSL_CPE_CRLF));
+
+ return DSL_ERROR;
+ }
- /* Mark disabled line num */
- pBndCtx->nPafLineDisabled = nLine;
+ /* Mark disabled line num */
+ pBndCtx->nPafLineDisabled = nLine;
- /* Clear paf-available line num */
- pBndCtx->nPafLineHandled = -1;
+ /* Clear paf-available line num */
+ pBndCtx->nPafLineHandled = -1;
+ }
}
else
{
diff -Naur org/configure.in new/configure.in
--- org/configure.in
+++ new/configure.in
@@ -1,6 +1,6 @@
AC_REVISION($Revision: 1.173 $)
-AC_INIT([DSL CPE Control application],[4.19.3-pa1],[],[dsl_cpe_control])
+AC_INIT([DSL CPE Control application],[4.19.3-pa2],[],[dsl_cpe_control])
AC_CONFIG_SRCDIR(src/Makefile.am)
AM_INIT_AUTOMAKE([tar-pax])
diff -Naur org/src/dsl_cpe_control.c new/src/dsl_cpe_control.c
--- org/src/dsl_cpe_control.c
+++ new/src/dsl_cpe_control.c
@@ -2769,6 +2769,7 @@ DSL_Error_t DSL_CPE_ScriptExecute (
DSL_char_t *buf = DSL_NULL;
DSL_char_t *args = DSL_NULL;
DSL_char_t nLineIdentifiers[3][9] = { "nLine=0", "nLine=1", "nLine=-1" };
+ DSL_uint16_t nLineOffset = 0;
DSL_char_t *pLine = DSL_NULL;
DSL_char_t *str_command = DSL_NULL;
DSL_boolean_t bTagFound = DSL_FALSE,
@@ -3757,14 +3758,39 @@ DSL_Error_t DSL_CPE_ScriptExecute (
str_command[script_buf->nSize - 1] = '\0';
args = buf + DSL_MIN(strlen(str_command) + 1, script_buf->nSize - 1);
+ nLineOffset = 0;
if(strncmp(args, nLineIdentifiers[0], strlen(nLineIdentifiers[0])) == 0 ||
- strncmp(args, nLineIdentifiers[1], strlen(nLineIdentifiers[1])) == 0 ||
- strncmp(args, nLineIdentifiers[2], strlen(nLineIdentifiers[2])) == 0)
+ strncmp(args, nLineIdentifiers[1], strlen(nLineIdentifiers[1])) == 0)
+ {
+ /* remove 'nLine=[0|1]' from args */
+ if(pContext->bBackwardCompMode)
+ {
+ nLineOffset = strlen(nLineIdentifiers[0]);
+ }
+ else
+ {
+ nLineOffset = strlen(nLineIdentifiers[0]) - 1;
+ }
+ }
+ else if(strncmp(args, nLineIdentifiers[2], strlen(nLineIdentifiers[2])) == 0)
+ {
+ /* remove 'nLine=-1' from args */
+ if(pContext->bBackwardCompMode)
+ {
+ nLineOffset = strlen(nLineIdentifiers[2]);
+ }
+ else
+ {
+ nLineOffset = strlen(nLineIdentifiers[0]) - 2;
+ }
+ }
+
+ if(nLineOffset > 0)
{
/* Check if a CLI command is given */
DSL_CPE_CliDeviceCommandExecute (pContext, nDevice,
- str_command, args + (strlen(nLineIdentifiers[0]) - 1), DSL_CPE_STDOUT);
+ str_command, args + nLineOffset, DSL_CPE_STDOUT);
}
else
{
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment