]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
moves the switch_rtp_request_port() call from the contructor to FSH323Connection...
authorGeorgiewskiy Yuriy <bottleman@icf.org.ru>
Tue, 20 Sep 2011 11:22:09 +0000 (15:22 +0400)
committerGeorgiewskiy Yuriy <bottleman@icf.org.ru>
Tue, 20 Sep 2011 11:22:09 +0000 (15:22 +0400)
src/mod/endpoints/mod_h323/changes.txt
src/mod/endpoints/mod_h323/mod_h323.cpp

index 0076291621187b33b4c103e36d4c811dcfd0b475..80d9119e4d1ca50b7f7e82f209b1dce9249e18b8 100644 (file)
@@ -1,3 +1,6 @@
+moves the switch_rtp_request_port() call from the contructor to FSH323Connection::CreateRealTimeLogicalChannel() - fix 
+    rtp port leak. tnx to Peter Olsson.
+fix log printing
 fix small interoperability issues if remote endpoint send progress twice
 make sure dtmfinband gets initialized
 make gk-identifier and gk-interface settings optional (documentation sayed that about gk-identifier already)
index 72846b07dc2bea184c3b2cffffa84dfee5fce1d5..26323ddaeadc0fc19ed817f4a9ec4f2fff8e6da2 100644 (file)
@@ -413,7 +413,7 @@ bool FSH323EndPoint::Initialise(switch_loadable_module_interface_t *iface)
                        }               
                }
        }
-
+       
        if (m_fax_old_asn) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "--->fax_old_asn\n");
                SetT38_IFP_PRE();
@@ -714,6 +714,7 @@ FSH323Connection::FSH323Connection(FSH323EndPoint& endpoint, H323Transport* tran
        , m_rtp_resetting(0)
        , m_isRequst_fax(false)
        , m_channel_hangup(false)
+       , m_RTPlocalPort(0)
 {
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,"======>FSH323Connection::FSH323Connection [%p]\n",this);
 
@@ -739,8 +740,6 @@ FSH323Connection::FSH323Connection(FSH323EndPoint& endpoint, H323Transport* tran
 
                switch_channel_set_state(m_fsChannel, CS_INIT);
        }
-       
-       m_RTPlocalPort = switch_rtp_request_port((const char *)m_RTPlocalIP.AsString());
 }      
 
 FSH323Connection::~FSH323Connection()
@@ -974,6 +973,9 @@ H323Channel* FSH323Connection::CreateRealTimeLogicalChannel(const H323Capability
        
        H323TransportAddress m_h323transportadd = GetSignallingChannel()->GetLocalAddress();
        m_h323transportadd.GetIpAddress(m_RTPlocalIP);
+       if (!m_RTPlocalPort) {
+               m_RTPlocalPort = switch_rtp_request_port((const char *)m_RTPlocalIP.AsString());
+       }
 
        return new FSH323_ExternalRTPChannel(*this, capability, dir, sessionID,m_RTPlocalIP,m_RTPlocalPort);
 }
@@ -2044,7 +2046,7 @@ PBoolean FSH323_ExternalRTPChannel::Start()
                        , GetMainTypes[m_capability->GetMainType()],(const char*)(m_capability->GetFormatName()),this);
        }
 
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,"%s initialise %s codec %s for connection [%p]\n",switch_channel_get_name(m_fsChannel),((GetDirection() == IsReceiver)? " read" : " write")
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,"%s Unsupported ptime of %u on %s %s codec %s for connection [%p]\n",switch_channel_get_name(m_fsChannel),((GetDirection() == IsReceiver)? " read" : " write")
                , GetMainTypes[m_capability->GetMainType()],(const char*)(m_capability->GetFormatName()),this);
        
        if (GetDirection() == IsReceiver) {