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