[asterisk-commits] kpfleming: trunk r77821 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 31 10:01:28 CDT 2007


Author: kpfleming
Date: Tue Jul 31 10:01:27 2007
New Revision: 77821

URL: http://svn.digium.com/view/asterisk?view=rev&rev=77821
Log:
there is no use in having functions that have no code in them, and hide the locking info when DEBUG_THREADS is enabled... i could have fixed this to be dependent on DEBUG_THREADS, but it would be just as easy for someone to add their test/debugging code to the macros as it would have been to the functions

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=77821&r1=77820&r2=77821
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Jul 31 10:01:27 2007
@@ -1841,24 +1841,8 @@
 	get_codec: sip_get_codec,
 };
 
-#ifndef DETECT_DEADLOCKS
-/*! \brief Helper function to lock, hiding the underlying locking mechanism.  */
-static void sip_pvt_lock(struct sip_pvt *pvt)
-{
-	ast_mutex_lock(&pvt->pvt_lock);
-}
-
-/*! \brief Helper function to unlock pvt, hiding the underlying locking mechanism. */
-static void sip_pvt_unlock(struct sip_pvt *pvt)
-{
-	ast_mutex_unlock(&pvt->pvt_lock);
-}
-#else
-/* we don't want to HIDE the information about where the lock was requested if trying to debug 
- * deadlocks!  So, just make these macros! */
 #define sip_pvt_lock(x) ast_mutex_lock(&x->pvt_lock)
 #define sip_pvt_unlock(x) ast_mutex_unlock(&x->pvt_lock)
-#endif
 
 /*!
  * helper functions to unreference various types of objects.




More information about the asterisk-commits mailing list