X-Git-Url: http://sjero.net/git/?p=linphone;a=blobdiff_plain;f=coreapi%2FTunnelManager.cc;h=409f9c42a83635c41ba6ff2890b7166aae46d9f6;hp=d1020b1b2782f6d431fefa607771a1ea4bd05173;hb=5f0d5793b7e65a518076de6f8e253770503f8824;hpb=1b7857fc8136af71c8d623c68748eec0cb6905d2 diff --git a/coreapi/TunnelManager.cc b/coreapi/TunnelManager.cc index d1020b1b..409f9c42 100644 --- a/coreapi/TunnelManager.cc +++ b/coreapi/TunnelManager.cc @@ -189,7 +189,7 @@ bool TunnelManager::isStarted() { } bool TunnelManager::isReady() const { - return mTunnelClient && mTunnelClient->isReady(); + return mTunnelClient && mTunnelClient->isReady() && mReady; } int TunnelManager::customSendto(struct _RtpTransport *t, mblk_t *msg , int flags, const struct sockaddr *to, socklen_t tolen){ @@ -214,6 +214,7 @@ TunnelManager::TunnelManager(LinphoneCore* lc) :TunnelClientController() ,mEnabled(false) ,mTunnelClient(NULL) ,mAutoDetectStarted(false) +,mReady(false) ,mHttpProxyPort(0){ mExosipTransport.data=this; @@ -271,6 +272,7 @@ void TunnelManager::processTunnelEvent(const Event &ev){ if (lProxy) { linphone_proxy_config_done(lProxy); } + mReady=true; }else if (mEnabled && !mTunnelClient->isReady()){ /* we got disconnected from the tunnel */ if (lProxy && linphone_proxy_config_is_registered(lProxy)) { @@ -278,6 +280,7 @@ void TunnelManager::processTunnelEvent(const Event &ev){ linphone_proxy_config_edit(lProxy); linphone_core_iterate(mCore); } + mReady=false; } } @@ -317,7 +320,7 @@ void TunnelManager::enable(bool isEnable) { mEnabled=false; stopClient(); - + mReady=false; linphone_core_set_rtp_transport_factories(mCore,NULL); eXosip_transport_hook_register(NULL);