[asterisk-dev] Doubt about mutex handling in chan_sip

Juan Carlos Castro y Castro jcastro at instant.com.br
Fri Mar 23 08:14:33 MST 2007


I see that sip_new() assumes the pvt lock is already locked, unlocks it 
temporarily while it allocates an ast_channel, and leaves it locked. How 
does that work, i.e., where is the lock going to eventually get released?

Or does it do that "just in case", and relasing an already-released lock 
followed by a lock actually leaves the mutex unlocked? (I don't know if 
mutexes actually work like that)

Juan


More information about the asterisk-dev mailing list