Commit 8adf559e authored by Stepan Salenikovich's avatar Stepan Salenikovich Committed by Guillaume Roguez

upnp: prevent deleting of port mapping

Prevent DHT port mapping from being deleted when
doUnregister complete after doRegister

Refs #65266

Change-Id: I7545e48e4c959478283d3d008b4bd0c54b5df3bf
parent 08cb82bc
......@@ -786,6 +786,12 @@ void RingAccount::doUnregister(std::function<void(bool)> released_cb)
pendingCalls_.clear();
pendingSipCalls_.clear();
}
if (getUseUPnP()) {
RING_DBG("UPnP : removing port mapping for DHT account.");
upnp_->removeMappings();
}
Manager::instance().unregisterEventHandler((uintptr_t)this);
saveNodes(dht_.exportNodes());
saveValues(dht_.exportValues());
......@@ -794,11 +800,6 @@ void RingAccount::doUnregister(std::function<void(bool)> released_cb)
setRegistrationState(RegistrationState::UNREGISTERED);
if (released_cb)
released_cb(false);
if (getUseUPnP()) {
RING_DBG("UPnP : removing port mapping for DHT account.");
upnp_->removeMappings();
}
}
void
......
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