[asterisk-commits] mmichelson: branch mmichelson/chan_fixup r173352 - /team/mmichelson/chan_fixu...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 3 20:28:48 CST 2009


Author: mmichelson
Date: Tue Feb  3 20:28:48 2009
New Revision: 173352

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=173352
Log:
Add XXX comments pertaining to locking order concerns and remove
some doxygen that doesn't apply any more.


Modified:
    team/mmichelson/chan_fixup/apps/app_chanspy.c

Modified: team/mmichelson/chan_fixup/apps/app_chanspy.c
URL: http://svn.digium.com/svn-view/asterisk/team/mmichelson/chan_fixup/apps/app_chanspy.c?view=diff&rev=173352&r1=173351&r2=173352
==============================================================================
--- team/mmichelson/chan_fixup/apps/app_chanspy.c (original)
+++ team/mmichelson/chan_fixup/apps/app_chanspy.c Tue Feb  3 20:28:48 2009
@@ -241,6 +241,7 @@
 	ast_autochan_lock(spyee_chanspy_autochan);
 	if (spyee_chanspy_autochan->chan) {
 		spyee = spyee_chanspy_autochan->chan;
+		/* XXX LOCKING ORDER */
 		ast_channel_lock(spyee);
 	}
 	ast_autochan_unlock(spyee_chanspy_autochan);
@@ -377,10 +378,6 @@
 	return running;
 }
 
-/*!
- * \note This relies on the embedded lock to be recursive, as it may be called
- * due to a call to autochan_null with the lock held there.
- */
 static void autochan_null(struct ast_autochan *autochan)
 {
 	if (!autochan) {
@@ -440,6 +437,7 @@
 		goto redo;
 	}
 
+	/* XXX LOCKING ORDER */
 	return setup_chanspy_autochan(this, autochan);
 }
 
@@ -592,6 +590,7 @@
 				snprintf(nameprefix, AST_NAME_STRLEN, "%s/%d", spec, res);
 
 				if ((next = ast_get_channel_by_name_prefix_locked(nameprefix, strlen(nameprefix)))) {
+					/* XXX LOCKING ORDER */
 					autochan_null(peer_chanspy_autochan);
 					next_chanspy_autochan = setup_chanspy_autochan(next, autochan);
 				} else {
@@ -599,6 +598,7 @@
 
 					ast_autochan_lock(peer_chanspy_autochan);
 					if (peer_chanspy_autochan->chan) {
+						/* XXX LOCKING ORDER */
 						ast_channel_lock(peer_chanspy_autochan->chan);
 						next_chanspy_autochan = peer_chanspy_autochan;
 						peer_chanspy_autochan = NULL;




More information about the asterisk-commits mailing list