Anonymous | Login | Signup for a new account | 2021-03-01 19:44 CET | ![]() |
My View | View Issues | Change Log | Roadmap | My Account |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000108 | easycwmp | [All Projects] 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 | OS Version | |||||
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. | ||||||||
Attached Files | |||||||||
![]() |
|
(0000356) mohamed.kallel (manager) 2016-01-05 09:15 |
why you have added these line + len = strlen(command_key); + if(command_key[len - 1] == ' ') + command_key[len - 1] = '\0'; |
(0000357) swcims (reporter) 2016-01-05 11:34 |
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. |
(0000359) mohamed.kallel (manager) 2016-01-05 11:48 |
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 |
(0000362) mohamed.kallel (manager) 2016-01-05 14:59 |
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 |
Copyright © 2000 - 2021 MantisBT Team |