daemon: crash when receiving a call
Issue generated from Tuleap's migration script. Originally submitted by: Alexandre Lision (alision)
I got a crash du to this commit 1e249e4fe
Crash happends in setSecure method in sipcall.cpp:
void
SIPCall::setSecure(bool sec)
{
if (srtpEnabled\_)
return;
if (sec && getConnectionState() != ConnectionState::DISCONNECTED) {
throw std::runtime\_error("Can't enable security since call is already connected");
}
srtpEnabled\_ = sec;
}
The two conditions for the Runtime Exception are met every time:
- sec > 0
- state is CONNECTING, I can see the last state change event is:
libdring: call.cpp:163 | [call:6414282570080789912] emit client call state change CONNECTING, code 0