[asterisk-commits] file: trunk r404138 - in /trunk: ./ res/res_calendar.c

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


Author: file
Date: Wed Dec 18 06:01:46 2013
New Revision: 404138

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=404138
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
........

Merged revisions 404137 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/res/res_calendar.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Wed Dec 18 06:01:46 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-403290,403292-403778,403781-404006,404027,404029,404042,404046,404048,404050,404099
+/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-403290,403292-403778,403781-404006,404027,404029,404042,404046,404048,404050,404099,404137

Modified: trunk/res/res_calendar.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_calendar.c?view=diff&rev=404138&r1=404137&r2=404138
==============================================================================
--- trunk/res/res_calendar.c (original)
+++ trunk/res/res_calendar.c Wed Dec 18 06:01:46 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