Commit 797131da authored by Adrien Béraud's avatar Adrien Béraud

sipcall: cleanup

Change-Id: I993003f8d448a1181ecdd167df10bedc2048b76e
parent c38ba2ed
......@@ -167,11 +167,10 @@ SIPCall::setTransport(const std::shared_ptr<SipTransport>& t)
if (transport_) {
setSecure(transport_->isSecure());
std::weak_ptr<SIPCall> wthis_ = std::static_pointer_cast<SIPCall>(shared_from_this());
// listen for transport destruction
transport_->addStateListener(list_id,
[wthis_] (pjsip_transport_state state, const pjsip_transport_state_info*) {
[wthis_ = weak()] (pjsip_transport_state state, const pjsip_transport_state_info*) {
if (auto this_ = wthis_.lock()) {
// end the call if the SIP transport is shut down
if (not SipTransport::isAlive(this_->transport_, state) and this_->getConnectionState() != ConnectionState::DISCONNECTED) {
......
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