From 09e1a74f897b8a817133343fe99b22e641730eaa Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandre.savard@savoirfairelinux.com> Date: Fri, 22 Apr 2011 12:10:35 -0400 Subject: [PATCH] [#5623] Enlarge initial size of pjsip memory pool for calls (16k) --- sflphone-common/src/sip/sdp.cpp | 1 - sflphone-common/src/sip/sipcall.cpp | 5 +++-- sflphone-common/src/sip/sipvoiplink.cpp | 8 ++------ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/sflphone-common/src/sip/sdp.cpp b/sflphone-common/src/sip/sdp.cpp index 5a5d62532b..6b295b9d21 100644 --- a/sflphone-common/src/sip/sdp.cpp +++ b/sflphone-common/src/sip/sdp.cpp @@ -389,7 +389,6 @@ int Sdp::receivingAnswerAfterInitialOffer(const pjmedia_sdp_session* remote) if(pjmedia_sdp_neg_get_state(negociator) != PJMEDIA_SDP_NEG_STATE_WAIT_NEGO) { _warn("SDP: Session not in a valid state after receiving answer"); } - _debug("SDP: Negotiator state %s\n", pjmedia_sdp_neg_state_str(pjmedia_sdp_neg_get_state(negociator))); return status; diff --git a/sflphone-common/src/sip/sipcall.cpp b/sflphone-common/src/sip/sipcall.cpp index 91c1fca6bd..7d86567fb8 100644 --- a/sflphone-common/src/sip/sipcall.cpp +++ b/sflphone-common/src/sip/sipcall.cpp @@ -35,8 +35,8 @@ #include "global.h" // for _debug #include "sdp.h" -const int SIPCall::CALL_MEMPOOL_INIT_SIZE = 16000; -const int SIPCall::CALL_MEMPOOL_INC_SIZE = 4000; +const int SIPCall::CALL_MEMPOOL_INIT_SIZE = 16384; +const int SIPCall::CALL_MEMPOOL_INC_SIZE = 16384; // Must be large enough to clone sdp sessions SIPCall::SIPCall (const CallID& id, Call::CallType type, pj_caching_pool *caching_pool) : Call (id, type) , _cid (0) @@ -63,6 +63,7 @@ SIPCall::~SIPCall() delete _audiortp; _audiortp = NULL; + delete _local_sdp; _local_sdp = NULL; diff --git a/sflphone-common/src/sip/sipvoiplink.cpp b/sflphone-common/src/sip/sipvoiplink.cpp index 9302e9c9ef..82477e6fca 100644 --- a/sflphone-common/src/sip/sipvoiplink.cpp +++ b/sflphone-common/src/sip/sipvoiplink.cpp @@ -707,7 +707,7 @@ Call *SIPVoIPLink::newOutgoingCall (const CallID& id, const std::string& toUrl) // Building the local SDP offer call->getLocalSDP()->setLocalIP (addrSdp); - // status = call->getLocalSDP()->createOffer (account->getActiveCodecs ()); + status = call->getLocalSDP()->createOffer (account->getActiveCodecs ()); if (status != PJ_SUCCESS) { delete call; @@ -1736,10 +1736,6 @@ bool SIPVoIPLink::SIPNewIpToIpCall (const CallID& id, const std::string& to) _debug ("UserAgent: TO uri for IP2IP call: %s", toUri.c_str()); - // Building the local SDP offer - // call->getLocalSDP()->set_ip_address (addrSdp); - // call->getLocalSDP()->create_initial_offer (account->getActiveCodecs ()); - sfl::Codec* audiocodec = Manager::instance().getCodecDescriptorMap().instantiateCodec (PAYLOAD_CODEC_ULAW); // Audio Rtp Session must be initialized before creating initial offer in SDP session @@ -1755,7 +1751,7 @@ bool SIPVoIPLink::SIPNewIpToIpCall (const CallID& id, const std::string& to) // Building the local SDP offer call->getLocalSDP()->setLocalIP (addrSdp); - //call->getLocalSDP()->createOffer (account->getActiveCodecs ()); + call->getLocalSDP()->createOffer (account->getActiveCodecs ()); // Init TLS transport if enabled if (account->isTlsEnabled()) { -- GitLab