[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Sun Oct 17 18:16:59 CDT 2010


branch "master" has been updated
       via  0033e7aa459ad12bcb2ada572ef5c72da42f6a1f (commit)
      from  a96d82f739db22704e33899ea88dce862297ef8e (commit)

Summary of changes:
 src/PJSipSessionModule.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


- Log -----------------------------------------------------------------
commit 0033e7aa459ad12bcb2ada572ef5c72da42f6a1f
Author: Mark Michelson <mmichelson at digium.com>
Date:   Sun Oct 17 18:19:04 2010 -0500

    Be sure to properly null-terminate the address string that we pass to the SipSession.
    
    From time to time, the string would be very large and trigger an assertion in
    pjlib. Using debug output, I can confirm that this no longer occurs and that the
    address passed to pjlib is correct.

diff --git a/src/PJSipSessionModule.cpp b/src/PJSipSessionModule.cpp
index 69a1983..9f77224 100644
--- a/src/PJSipSessionModule.cpp
+++ b/src/PJSipSessionModule.cpp
@@ -847,7 +847,8 @@ void PJSipSessionModule::invOnMediaUpdate(pjsip_inv_session *inv, pj_status_t st
 
    PJSipSessionModInfo *session_mod_info = (PJSipSessionModInfo*)inv->mod_data[mModule.id];
    SipSessionPtr session = session_mod_info->getSessionPtr();
-   session->setRemoteDetails(pj_strbuf(&remote_conn->addr), remote_sdp->media[0]->desc.port);
+   std::string destination(pj_strbuf(&remote_conn->addr), pj_strlen(&remote_conn->addr));
+   session->setRemoteDetails(destination, remote_sdp->media[0]->desc.port);
 
    // Each stream has its own set of formats, so go to that granularity
    for (unsigned int stream = 0; stream < remote_sdp->media_count; stream++)

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list