freecwmp
[Top] [All Lists]

Re: [PATCH 08/27] Update lan_device script to support communicte data of

To: Mohamed <mohamed.kallel@pivasoftware.com>
Subject: Re: [PATCH 08/27] Update lan_device script to support communicte data of get parameter values to the core via ubus Contributed by Inteno Broadband Technology AB
From: Luka Perkov <freecwmp@lukaperkov.net>
Date: Sat, 8 Dec 2012 11:38:26 +0100
Cc: freecwmp@linux-mips.org, ahmed.zribi@pivasoftware.com, freecwmp@lukaperkov.net, jogo@openwrt.org
In-reply-to: <1354809292-2467-9-git-send-email-mohamed.kallel@pivasoftware.com>
Mail-followup-to: Mohamed <mohamed.kallel@pivasoftware.com>, freecwmp@linux-mips.org, ahmed.zribi@pivasoftware.com, jogo@openwrt.org
Original-recipient: rfc822;freecwmp@linux-mips.org
References: <mohamed.kallel@pivasoftware.com> <1354809292-2467-1-git-send-email-mohamed.kallel@pivasoftware.com> <1354809292-2467-9-git-send-email-mohamed.kallel@pivasoftware.com>
Sender: freecwmp-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Dec 06, 2012 at 04:54:33PM +0100, Mohamed wrote:
> 
> Signed-off-by: Ahmed ZRIBI <ahmed.zribi@pivasoftware.com>
> Signed-off-by: Mohamed <mohamed.kallel@pivasoftware.com>

NACK. Look at comment from patch v4.

> ---
>  ext/openwrt/scripts/functions/lan_device |   13 +++++++++++--
>  1 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/ext/openwrt/scripts/functions/lan_device 
> b/ext/openwrt/scripts/functions/lan_device
> index 5ba513c..fa9dda4 100644
> --- a/ext/openwrt/scripts/functions/lan_device
> +++ b/ext/openwrt/scripts/functions/lan_device
> @@ -3,6 +3,7 @@
>  
>  get_wlan_enable() {
>  local num="$1"
> +local type="xsd:boolean"
>  local val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get 
> wireless.@wifi-device[$num].disabled 2> /dev/null`
>  let num=$num+1
>  if [ "$val" = "1" ]; then
> @@ -10,7 +11,7 @@ if [ "$val" = "1" ]; then
>  else
>       val="1"
>  fi
> -freecwmp_output 
> "InternetGatewayDevice.LANDevice.1.WLANConfiguration.$num.Enable" "$val"
> +ubus_freecwmp_output 
> "InternetGatewayDevice.LANDevice.1.WLANConfiguration.$num.Enable" "$val" 
> "$type"
>  }
>  
>  set_wlan_enable() {
> @@ -29,7 +30,7 @@ get_wlan_ssid() {
>  local num="$1"
>  local val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} get 
> wireless.@wifi-iface[$num].ssid 2> /dev/null`
>  let num=$num+1
> -freecwmp_output 
> "InternetGatewayDevice.LANDevice.1.WLANConfiguration.$num.SSID" "$val"
> +ubus_freecwmp_output 
> "InternetGatewayDevice.LANDevice.1.WLANConfiguration.$num.SSID" "$val"
>  }
>  
>  set_wlan_ssid() {
> @@ -44,30 +45,38 @@ case "$1" in
>       InternetGatewayDevice.)
>       get_wlan_enable 0
>       get_wlan_ssid 0
> +     return $FAULT_CPE_NO_FAULT
>       ;;
>       InternetGatewayDevice.LANDevice.)
>       get_wlan_enable 0
>       get_wlan_ssid 0
> +     return $FAULT_CPE_NO_FAULT
>       ;;
>       InternetGatewayDevice.LANDevice.1.)
>       get_wlan_enable 0
>       get_wlan_ssid 0
> +     return $FAULT_CPE_NO_FAULT
>       ;;
>       InternetGatewayDevice.LANDevice.1.WLANConfiguration.)
>       get_wlan_enable 0
>       get_wlan_ssid 0
> +     return $FAULT_CPE_NO_FAULT
>       ;;
>       InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.)
>       get_wlan_enable 0
>       get_wlan_ssid 0
> +     return $FAULT_CPE_NO_FAULT
>       ;;
>       InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.Enable)
>       get_wlan_enable 0
> +     return $FAULT_CPE_NO_FAULT
>       ;;
>       InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSID)
>       get_wlan_ssid 0
> +     return $FAULT_CPE_NO_FAULT
>       ;;
>  esac
> +return $FAULT_CPE_INVALID_PARAMETER_NAME
>  }
>  
>  set_lan_device() {
> -- 
> 1.7.4.1

Luka 

<Prev in Thread] Current Thread [Next in Thread>