EasyCwmp

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000108easycwmp[All Projects] Bugpublic2016-01-05 06:442016-01-05 14:59
Reporterswcims 
Assigned Tomohamed.kallel 
PrioritynormalSeverityminorReproducibilitysometimes
StatusresolvedResolutionfixed 
PlatformOpenWRTOSLinuxOS Version
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.
Attached Files

- Relationships

-  Notes
(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

- 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


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker