From eabb749adc74d20423dfc2d299158bf5a87cd1f6 Mon Sep 17 00:00:00 2001 From: MOHAMED Kallel Date: Wed, 17 Sep 2014 12:19:28 +0100 Subject: [PATCH] *) 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 --- scripts/functions/common | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/functions/common b/scripts/functions/common index 334f3c7..10da0ba 100644 --- a/scripts/functions/common +++ b/scripts/functions/common @@ -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 $? -} - +} \ No newline at end of file