From 88e593e944cafecfc63ddbff23038fff96325ba7 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 8 Apr 2016 11:21:05 +0200 Subject: [PATCH] tunnel: add/improve some debug traces --- coreapi/TunnelManager.cc | 6 +++--- coreapi/linphone_tunnel.cc | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/coreapi/TunnelManager.cc b/coreapi/TunnelManager.cc index 362816674..15e7c29b5 100644 --- a/coreapi/TunnelManager.cc +++ b/coreapi/TunnelManager.cc @@ -343,7 +343,7 @@ LinphoneTunnelMode TunnelManager::getMode() const { void TunnelManager::processUdpMirrorEvent(const Event &ev){ if(mState != autodetecting) return; if (ev.mData.mHaveUdp) { - ms_message("TunnelManager: UDP mirror test succeed"); + ms_message("TunnelManager: UDP mirror test succeed on %s:%d", mCurrentUdpMirrorClient->getServerAddress().mAddr.c_str(), mCurrentUdpMirrorClient->getServerAddress().mPort); if(mTunnelClient) { if(mTunnelizeSipPackets) doUnregistration(); sal_set_tunnel(mCore->sal,NULL); @@ -353,10 +353,10 @@ void TunnelManager::processUdpMirrorEvent(const Event &ev){ } mState = disabled; } else { - ms_message("TunnelManager: UDP mirror test failed"); + ms_message("TunnelManager: UDP mirror test failed on %s:%d", mCurrentUdpMirrorClient->getServerAddress().mAddr.c_str(), mCurrentUdpMirrorClient->getServerAddress().mPort); mCurrentUdpMirrorClient++; if (mCurrentUdpMirrorClient !=mUdpMirrorClients.end()) { - ms_message("TunnelManager: trying another UDP mirror"); + ms_message("TunnelManager: trying another UDP mirror on %s:%d", mCurrentUdpMirrorClient->getServerAddress().mAddr.c_str(), mCurrentUdpMirrorClient->getServerAddress().mPort); if (mLongRunningTaskId == 0) mLongRunningTaskId = sal_begin_background_task("Tunnel auto detect", NULL, NULL); UdpMirrorClient &lUdpMirrorClient=*mCurrentUdpMirrorClient; diff --git a/coreapi/linphone_tunnel.cc b/coreapi/linphone_tunnel.cc index 76b320f06..b6529499f 100644 --- a/coreapi/linphone_tunnel.cc +++ b/coreapi/linphone_tunnel.cc @@ -361,6 +361,7 @@ void linphone_tunnel_configure(LinphoneTunnel *tunnel){ /* Deprecated functions */ void linphone_tunnel_enable(LinphoneTunnel *tunnel, bool_t enabled) { + ms_warning("linphone_tunnel_enable is deprecated - please use linphone_tunnel_set_mode instead."); if(enabled) linphone_tunnel_set_mode(tunnel, LinphoneTunnelModeEnable); else linphone_tunnel_set_mode(tunnel, LinphoneTunnelModeDisable); }