View Issue Details

IDProjectCategoryView StatusLast Update
0000108easycwmpBugpublic2016-01-05 14:59
Reporterswcims Assigned Tomohamed.kallel  
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
PlatformOpenWRTOSLinux 
Summary0000108: handling arguments with white spaces (schedule inform CommandKey as example)
DescriptionHi Manager,
    I encounter one issue on hanlding scheduleInform message:
    when ACS sends schedule inform msg with commandkey "ScheduleInform test", easycwmp will responds with commandky "test" . It means xml handling function separates the original command key by the whitespace. Here is my patch, please check it:
@@ -1470,7 +1488,12 @@ static int xml_handle_schedule_inform(mx
             b->value.text.string &&
             b->parent->type == MXML_ELEMENT &&
             !strcmp(b->parent->value.element.name, "CommandKey")) {
- command_key = b->value.text.string;
+ //command_key = b->value.text.string;
+ int len;
+ command_key = xml_get_value_with_whitespace(&b, body_in);
+ len = strlen(command_key);
+ if(command_key[len - 1] == ' ')
+ command_key[len - 1] = '\0';
         }
         if (b && b->type == MXML_ELEMENT &&
             !strcmp(b->value.element.name, "CommandKey") &&

TagsNo tags attached.
e-mail notification

Activities

mohamed.kallel

2016-01-05 09:15

administrator   ~0000356

why you have added these line

+ len = strlen(command_key);
+ if(command_key[len - 1] == ' ')
+ command_key[len - 1] = '\0';

swcims

2016-01-05 11:34

reporter   ~0000357

Function xml_get_value_with_whitespace(&b, body_in) will append a whitespace in order to link the strings. So need to strip the last whitespace.

mohamed.kallel

2016-01-05 11:48

administrator   ~0000359

xml_get_value_with_whitespace() does not append white space at the end of the string.
it appends white space at the end of the string only if the original string contains space at the end

mohamed.kallel

2016-01-05 14:59

administrator   ~0000362

fixed in EasyCwmp-1.2.7

Issue History

Date Modified Username Field Change
2016-01-05 06:44 swcims New Issue
2016-01-05 09:15 mohamed.kallel Note Added: 0000356
2016-01-05 10:17 mohamed.kallel Summary patch for handling schedule inform message issu => handling arguments with white spaces (schedule inform CommandKey as example)
2016-01-05 11:34 swcims Note Added: 0000357
2016-01-05 11:48 mohamed.kallel Note Added: 0000359
2016-01-05 14:59 mohamed.kallel Note Added: 0000362
2016-01-05 14:59 mohamed.kallel Status new => resolved
2016-01-05 14:59 mohamed.kallel Resolution open => fixed
2016-01-05 14:59 mohamed.kallel Assigned To => mohamed.kallel