summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2009-10-09 15:00:49 +0000
committerTerry Wilson <twilson@digium.com>2009-10-09 15:00:49 +0000
commitd81a8e34dd22f26b817810e1b2556ede0afce086 (patch)
treeab32ea5e36dbacc555d87f38174bcb0704f21944 /res
parenta75ba8d1a9ed3a025416001fa2098ac7cfa613e8 (diff)
Don't add Attendees during copy, replace them
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r--res/res_calendar.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/res/res_calendar.c b/res/res_calendar.c
index 6ec7b424c..5239fa633 100644
--- a/res/res_calendar.c
+++ b/res/res_calendar.c
@@ -637,7 +637,7 @@ static int calendar_event_notify(const void *data)
tmp++;
ast_copy_string(dest, tmp, sizeof(dest));
} else {
- ast_log(LOG_WARNING, "Channel should be in form Tech/Dest\n");
+ ast_log(LOG_WARNING, "Channel should be in form Tech/Dest (was '%s')\n", tech);
goto notify_cleanup;
}
@@ -753,6 +753,12 @@ static void copy_event_data(struct ast_calendar_event *dst, struct ast_calendar_
dst->alarm = src->alarm;
dst->busy_state = src->busy_state;
+ /* Delete any existing attendees */
+ while ((attendee = AST_LIST_REMOVE_HEAD(&dst->attendees, next))) {
+ ast_free(attendee);
+ }
+
+ /* Copy over the new attendees */
while ((attendee = AST_LIST_REMOVE_HEAD(&src->attendees, next))) {
AST_LIST_INSERT_TAIL(&dst->attendees, attendee, next);
}