]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix for calendar categories and priorities according to ISO C90
authorJan Kalab <pitlicek@gmail.com>
Fri, 3 Sep 2010 12:48:59 +0000 (12:48 +0000)
committerJan Kalab <pitlicek@gmail.com>
Fri, 3 Sep 2010 12:48:59 +0000 (12:48 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@284850 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_calendar_ews.c

index e9d40089f10f0650b5b5076505a57857f7703d98..f55a73df4ef1a60f076b2e335bde5a18e5abe8d4 100644 (file)
@@ -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, "<Categories>");
-               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, "<String>%s</String>", category);
                        category = strsep(&categories, ",");