View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000108 | easycwmp | Bug | public | 2016-01-05 06:44 | 2016-01-05 14:59 |
Reporter | swcims | Assigned To | mohamed.kallel | ||
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Platform | OpenWRT | OS | Linux | ||
Summary | 0000108: handling arguments with white spaces (schedule inform CommandKey as example) | ||||
Description | Hi 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") && | ||||
Tags | No tags attached. | ||||
e-mail notification | |||||
|
why you have added these line + len = strlen(command_key); + if(command_key[len - 1] == ' ') + command_key[len - 1] = '\0'; |
|
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. |
|
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 |
|
fixed in EasyCwmp-1.2.7 |
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 |