[asterisk-commits] twilson: branch twilson/calendaring r161420 - /team/twilson/calendaring/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 5 14:48:55 CST 2008


Author: twilson
Date: Fri Dec  5 14:48:54 2008
New Revision: 161420

URL: http://svn.digium.com/view/asterisk?view=rev&rev=161420
Log:
and another ao2_callback conversion

Modified:
    team/twilson/calendaring/main/calendar.c

Modified: team/twilson/calendaring/main/calendar.c
URL: http://svn.digium.com/view/asterisk/team/twilson/calendaring/main/calendar.c?view=diff&rev=161420&r1=161419&r2=161420
==============================================================================
--- team/twilson/calendaring/main/calendar.c (original)
+++ team/twilson/calendaring/main/calendar.c Fri Dec  5 14:48:54 2008
@@ -1201,21 +1201,10 @@
 	.read = calendar_event_read,
 };
 
-static void delete_calendars(void)
-{
-	struct ao2_iterator i;
-	struct ast_calendar *cal;
-
-	i = ao2_iterator_init(calendars, 0);
-	while ((cal = ao2_iterator_next(&i))) {
-		ao2_unlink(calendars, cal);
-		cal = unref_calendar(cal);
-	}
-}
-
 int ast_calendar_reload()
 {
-	delete_calendars();
+	/* Delete all calendars */
+	ao2_callback(calendars, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, cb_true, NULL);
 	load_config(NULL);
 	return 0;
 }




More information about the asterisk-commits mailing list