[asterisk-commits] dlee: branch dlee/stasis-cache-split r394035 - /team/dlee/stasis-cache-split/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 10 19:42:13 CDT 2013


Author: dlee
Date: Wed Jul 10 19:42:11 2013
New Revision: 394035

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394035
Log:
Be sure to unlock the proper cache

Modified:
    team/dlee/stasis-cache-split/main/stasis_cache.c

Modified: team/dlee/stasis-cache-split/main/stasis_cache.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-cache-split/main/stasis_cache.c?view=diff&rev=394035&r1=394034&r2=394035
==============================================================================
--- team/dlee/stasis-cache-split/main/stasis_cache.c (original)
+++ team/dlee/stasis-cache-split/main/stasis_cache.c Wed Jul 10 19:42:11 2013
@@ -478,9 +478,10 @@
 	}
 
 	/* Now update the secondary caches */
-	ao2_lock(cache);
-	cache = cache->secondary_cache;
-	ao2_unlock(cache);
+	{
+		SCOPED_AO2LOCK(lock, cache);
+		cache = cache->secondary_cache;
+	}
 
 	while (cache) {
 		struct stasis_message *ignored =




More information about the asterisk-commits mailing list