From: Jan Kalab Date: Fri, 3 Sep 2010 12:48:59 +0000 (+0000) Subject: Fix for calendar categories and priorities according to ISO C90 X-Git-Tag: 1.8.0-rc1~3^2~97 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2cd6f30f3beef1bfa6c8e2b009c19499746f4b4c;p=thirdparty%2Fasterisk.git 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 --- diff --git a/res/res_calendar_ews.c b/res/res_calendar_ews.c index e9d40089f1..f55a73df4e 100644 --- a/res/res_calendar_ews.c +++ b/res/res_calendar_ews.c @@ -544,6 +544,7 @@ static int ewscal_write_event(struct ast_calendar_event *event) .pvt = pvt, }; int ret; + char *category, *categories; if (!pvt) { return -1; @@ -603,8 +604,8 @@ static int ewscal_write_event(struct ast_calendar_event *event) /* Event categories*/ if (strlen(event->categories) > 0) { ast_str_append(&request, 0, ""); - char *categories = strdupa(event->categories); /* Duplicate string, since strsep() is destructive */ - char *category = strsep(&categories, ","); + categories = strdupa(event->categories); /* Duplicate string, since strsep() is destructive */ + category = strsep(&categories, ","); while (category != NULL) { ast_str_append(&request, 0, "%s", category); category = strsep(&categories, ",");