[asterisk-commits] twilson: trunk r223053 - /trunk/res/res_calendar.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Oct 9 10:00:52 CDT 2009
Author: twilson
Date: Fri Oct 9 10:00:49 2009
New Revision: 223053
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=223053
Log:
Don't add Attendees during copy, replace them
Modified:
trunk/res/res_calendar.c
Modified: trunk/res/res_calendar.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_calendar.c?view=diff&rev=223053&r1=223052&r2=223053
==============================================================================
--- trunk/res/res_calendar.c (original)
+++ trunk/res/res_calendar.c Fri Oct 9 10:00:49 2009
@@ -637,7 +637,7 @@
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 @@
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);
}
More information about the asterisk-commits
mailing list