[asterisk-commits] murf: trunk r77829 - /trunk/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 31 10:59:02 CDT 2007
Author: murf
Date: Tue Jul 31 10:59:01 2007
New Revision: 77829
URL: http://svn.digium.com/view/asterisk?view=rev&rev=77829
Log:
thanks to Russel, for pointing out that the dialoglist_lock/unlock routines also need to be macros if DETECT_DEADLOCKS is set
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=77829&r1=77828&r2=77829
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Jul 31 10:59:01 2007
@@ -1136,6 +1136,7 @@
/*! \brief Protect the SIP dialog list (of sip_pvt's) */
AST_MUTEX_DEFINE_STATIC(dialoglock);
+#ifndef DETECT_DEADLOCKS
/*! \brief hide the way the list is locked/unlocked */
static void dialoglist_lock(void)
{
@@ -1146,6 +1147,12 @@
{
ast_mutex_unlock(&dialoglock);
}
+#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 dialoglist_lock(x) ast_mutex_lock(&dialoglock)
+#define dialoglist_unlock(x) ast_mutex_unlock(&dialoglock)
+#endif
/*!
* when we create or delete references, make sure to use these
More information about the asterisk-commits
mailing list