Bug 28 - TurnSocket acquires mutexes incorrectly
Summary: TurnSocket acquires mutexes incorrectly
Status: NEW
Alias: None
Product: resiprocate
Classification: Unclassified
Component: stack (libresip) (show other bugs)
Version: unspecified
Hardware: All All
: P1 major
Assignee: Owner of all unassigned bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-11 17:37 CDT by Chris
Modified: 2012-07-11 17:38 CDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2012-07-11 17:37:43 CDT
TurnSocket::sendTo(const asio::ip::address& address, unsigned short port, const char* buffer, unsigned int size) calls TurnSocket::sendTo(RemotePeer& remotePeer, const char* buffer, unsigned int size), leading to immediate deadlock every time. Both versions of sendTo acquire TurnSocket's mutex.

The solution is to refactor how the methods call each other and acquire the mutex...
Comment 1 Chris 2012-07-11 17:38:30 CDT
(In reply to comment #0)
> TurnSocket::sendTo(const asio::ip::address& address, unsigned short port, const
> char* buffer, unsigned int size) calls TurnSocket::sendTo(RemotePeer&
> remotePeer, const char* buffer, unsigned int size), leading to immediate
> deadlock every time. Both versions of sendTo acquire TurnSocket's mutex.
> 
> The solution is to refactor how the methods call each other and acquire the
> mutex...

See in version 1.7 reTurn/client/TurnSocket.cxx