mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 18:40:46 +00:00
Fix for calendar categories and priorities according to ISO C90
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@284850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -544,6 +544,7 @@ static int ewscal_write_event(struct ast_calendar_event *event)
|
|||||||
.pvt = pvt,
|
.pvt = pvt,
|
||||||
};
|
};
|
||||||
int ret;
|
int ret;
|
||||||
|
char *category, *categories;
|
||||||
|
|
||||||
if (!pvt) {
|
if (!pvt) {
|
||||||
return -1;
|
return -1;
|
||||||
@@ -603,8 +604,8 @@ static int ewscal_write_event(struct ast_calendar_event *event)
|
|||||||
/* Event categories*/
|
/* Event categories*/
|
||||||
if (strlen(event->categories) > 0) {
|
if (strlen(event->categories) > 0) {
|
||||||
ast_str_append(&request, 0, "<Categories>");
|
ast_str_append(&request, 0, "<Categories>");
|
||||||
char *categories = strdupa(event->categories); /* Duplicate string, since strsep() is destructive */
|
categories = strdupa(event->categories); /* Duplicate string, since strsep() is destructive */
|
||||||
char *category = strsep(&categories, ",");
|
category = strsep(&categories, ",");
|
||||||
while (category != NULL) {
|
while (category != NULL) {
|
||||||
ast_str_append(&request, 0, "<String>%s</String>", category);
|
ast_str_append(&request, 0, "<String>%s</String>", category);
|
||||||
category = strsep(&categories, ",");
|
category = strsep(&categories, ",");
|
||||||
|
Reference in New Issue
Block a user