*) set_cmd should not be added to json message if the permission is not = to 1

*) fix the SPV fault issue: SPV fault return parameter with prefix "-"

Signed-off-by: MOHAMED Kallel <mohamed.kallel@pivasoftware.com>
This commit is contained in:
MOHAMED Kallel 2014-09-17 12:19:28 +01:00 committed by Feten Besbes
parent 2d1a4221ef
commit eabb749adc

View file

@ -231,7 +231,7 @@ freecwmp_cache_output() {
json_add_string "writable" "$permission"
if [ "$type" != "" ]; then json_add_string "type" "$type"; fi
if [ "$get_cmd" != "" ]; then json_add_string "get_cmd" "$get_cmd"; fi
if [ "$set_cmd" != "" ]; then json_add_string "set_cmd" "$set_cmd"; fi
if [ "$set_cmd" != "" -a "$permission" = "1" ]; then json_add_string "set_cmd" "$set_cmd"; fi
if [ "$notif_permission" != "" ]; then json_add_string "notif_permission" "$notif_permission"; fi
if [ "$notification" != "" ]; then
json_add_string "notification" "$notification"
@ -534,7 +534,7 @@ fi
}
freecwmp_set_parameter_fault() {
local parm="-$1"
local parm="$1"
local fault="$2"
freecwmp_fault_output "$parm" "$fault" >> $set_fault_tmp_file
}
@ -966,5 +966,4 @@ object_fn_generic() {
local f="$action"_"$fn"
$f "$1" "$found"
return $?
}
}