[asterisk-commits] russell: trunk r114676 - /trunk/pbx/pbx_lua.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 25 17:04:47 CDT 2008


Author: russell
Date: Fri Apr 25 17:04:46 2008
New Revision: 114676

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114676
Log:
Lock the channel around datastore access

(closes issue #12527)
Reported by: mnicholson
Patches:
      pbx_lua4.diff uploaded by mnicholson (license 96)

Modified:
    trunk/pbx/pbx_lua.c

Modified: trunk/pbx/pbx_lua.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_lua.c?view=diff&rev=114676&r1=114675&r2=114676
==============================================================================
--- trunk/pbx/pbx_lua.c (original)
+++ trunk/pbx/pbx_lua.c Fri Apr 25 17:04:46 2008
@@ -982,7 +982,9 @@
 		}
 		return L;
 	} else {
+		ast_channel_lock(chan);
 		datastore = ast_channel_datastore_find(chan, &lua_datastore, NULL);
+		ast_channel_unlock(chan);
 
 		if (!datastore) {
 			/* nothing found, allocate a new lua state */




More information about the asterisk-commits mailing list