Commit 49b9893b authored by Rafaël Carré's avatar Rafaël Carré

Fix account registration on start

parent e789603e
......@@ -284,19 +284,17 @@ void SIPVoIPLink::sendRegister (Account *a)
pjsip_transport_dec_ref(account->transport);
createSipTransport(account);
if (account->transport)
return;
// Could not create new transport, this transport may already exists
account->transport = transportMap_[account->getLocalPort()];
if (account->transport) {
pjsip_transport_add_ref(account->transport);
} else {
account->transport = _localUDPTransport;
account->setLocalPort(_localUDPTransport->local_name.port);
}
ost::MutexLock m(mutexSIP_);
if (!account->transport) {
// Could not create new transport, this transport may already exists
account->transport = transportMap_[account->getLocalPort()];
if (account->transport) {
pjsip_transport_add_ref(account->transport);
} else {
account->transport = _localUDPTransport;
account->setLocalPort(_localUDPTransport->local_name.port);
}
}
account->setRegister(true);
account->setRegistrationState (Trying);
......
......@@ -350,11 +350,6 @@ class SIPVoIPLink : public VoIPLink
*/
EventThread *evThread_;
/**
* Global mutex for the sip voiplink
*/
ost::Mutex mutexSIP_;
friend class SIPTest;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment