[asterisk-commits] file: branch 1.8 r404135 - /branches/1.8/res/res_calendar.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 18 05:58:58 CST 2013


Author: file
Date: Wed Dec 18 05:58:44 2013
New Revision: 404135

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=404135
Log:
res_calendar: Protect channel when adding.

This change adds a missing channel lock when adding a datastore
to a channel.

Modified:
    branches/1.8/res/res_calendar.c

Modified: branches/1.8/res/res_calendar.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_calendar.c?view=diff&rev=404135&r1=404134&r2=404135
==============================================================================
--- branches/1.8/res/res_calendar.c (original)
+++ branches/1.8/res/res_calendar.c Wed Dec 18 05:58:44 2013
@@ -725,7 +725,10 @@
 	datastore->inheritance = DATASTORE_INHERIT_FOREVER;
 
 	ao2_ref(event, +1);
+
+	ast_channel_lock(chan);
 	res = ast_channel_datastore_add(chan, datastore);
+	ast_channel_unlock(chan);
 
 	if (!(apptext = ast_str_create(32))) {
 		goto notify_cleanup;




More information about the asterisk-commits mailing list