[asterisk-commits] mmichelson: branch 1.6.0 r157501 - /branches/1.6.0/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 18 16:15:31 CST 2008


Author: mmichelson
Date: Tue Nov 18 16:15:31 2008
New Revision: 157501

URL: http://svn.digium.com/view/asterisk?view=rev&rev=157501
Log:
Once again, Russell to the rescue. Use the builtin astobj1 lock
of the sip_peer and sip_user instead of adding a new one


Modified:
    branches/1.6.0/channels/chan_sip.c

Modified: branches/1.6.0/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/channels/chan_sip.c?view=diff&rev=157501&r1=157500&r2=157501
==============================================================================
--- branches/1.6.0/channels/chan_sip.c (original)
+++ branches/1.6.0/channels/chan_sip.c Tue Nov 18 16:15:31 2008
@@ -1416,7 +1416,6 @@
 	int maxcallbitrate;		/*!< Maximum Bitrate for a video call */
 	int autoframing;
 	struct sip_st_cfg stimer;	/*!< SIP Session-Timers */
-	ast_mutex_t lock;
 };
 
 /*!
@@ -1510,7 +1509,6 @@
 	int timer_t1;			/*!<  The maximum T1 value for the peer */
 	int timer_b;			/*!<  The maximum timer B (transaction timeouts) */
 	int deprecated_username; /*!< If it's a realtime peer, are they using the deprecated "username" instead of "defaultuser" */
-	ast_mutex_t lock;
 };
 
 
@@ -4506,13 +4504,13 @@
 		inuse = &u->inUse;
 		call_limit = &u->call_limit;
 		inringing = NULL;
-		pu_lock = &u->lock;
+		pu_lock = &u->_lock;
 	} else if ( (p = find_peer(ast_strlen_zero(fup->peername) ? name : fup->peername, NULL, 1, 0) ) ) { /* Try to find peer */
 		inuse = &p->inUse;
 		call_limit = &p->call_limit;
 		inringing = &p->inRinging;
 		ast_copy_string(name, fup->peername, sizeof(name));
-		pu_lock = &p->lock;
+		pu_lock = &p->_lock;
 	}
 	if (!p && !u) {
 		ast_debug(2, "%s is not a local device, no call limit\n", name);




More information about the asterisk-commits mailing list