[asterisk-commits] file: branch 12 r404137 - in /branches/12: ./ res/res_calendar.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 18 06:00:53 CST 2013


Author: file
Date: Wed Dec 18 06:00:51 2013
New Revision: 404137

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

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

Merged revisions 404135 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 404136 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    branches/12/   (props changed)
    branches/12/res/res_calendar.c

Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: branches/12/res/res_calendar.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_calendar.c?view=diff&rev=404137&r1=404136&r2=404137
==============================================================================
--- branches/12/res/res_calendar.c (original)
+++ branches/12/res/res_calendar.c Wed Dec 18 06:00:51 2013
@@ -775,7 +775,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 (!(tmpstr = ast_str_create(32))) {
 		goto notify_cleanup;




More information about the asterisk-commits mailing list