Commit 30e504c2 authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

TunnelManager.cc: invoke sal_set_tunnel when destroying tunnel

parent 3df8f6f3
......@@ -165,6 +165,7 @@ TunnelManager::~TunnelManager(){
udpMirror->stop();
}
if(mTunnelClient) delete mTunnelClient;
sal_set_tunnel(mCore->sal,NULL);
linphone_core_remove_listener(mCore, mVTable);
linphone_core_v_table_destroy(mVTable);
}
......@@ -197,7 +198,7 @@ void TunnelManager::processTunnelEvent(const Event &ev){
_linphone_core_apply_transports(mCore);
doRegistration();
}
}
} else {
ms_error("TunnelManager: tunnel has been disconnected");
......@@ -336,6 +337,7 @@ void TunnelManager::processUdpMirrorEvent(const Event &ev){
ms_message("TunnelManager: UDP mirror test succeed");
if(mTunnelClient) {
if(mTunnelizeSipPackets) doUnregistration();
sal_set_tunnel(mCore->sal,NULL);
delete mTunnelClient;
mTunnelClient = NULL;
if(mTunnelizeSipPackets) doRegistration();
......
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