Ignore:
Timestamp:
May 29, 2009 1:04:03 PM (15 years ago)
Author:
bennylp
Message:

Integration of Sipit24 branch, many tickets involved:

  • #793: AMR encoder should regard 'mode-set' param specified by remote decoder.
  • #831: Automatically switch to TCP transport when sending large request
  • #832: Support for outbound proxy setting without using Route header
  • #849: Modify conference audio switch behavior in connecting ports.
  • #850: Remove 'Require=replaces' param in 'Refer-To' header (in call transfer with replaces).
  • #851: Support for regular nomination in ICE
  • #852: --ip-addr support for IPv6 for media transport in pjsua
  • #854: Adding SOFTWARE attribute in all outgoing requests may cause compatibility problem with older STUN server (thanks Alexei Kuznetsov for the report)
  • #855: Bug in digit map frequencies for DTMF digits (thanks FCCH for the report)
  • #856: Put back the ICE candidate priority values according to the default values in the draft-mmusic-ice
  • #857: Support for ICE keep-alive with Binding indication
  • #858: Do not authenticate STUN 438 response
  • #859: AMR-WB format param in the SDP is not negotiated correctly.
  • #867: Return error instead of asserting when PJSUA-LIB fails to open log file
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_transport.c

    r2394 r2724  
    435435} 
    436436 
     437/* 
     438 * Print the SIP message to transmit data buffer's internal buffer. 
     439 */ 
     440PJ_DEF(pj_status_t) pjsip_tx_data_encode(pjsip_tx_data *tdata) 
     441{ 
     442    /* Allocate buffer if necessary. */ 
     443    if (tdata->buf.start == NULL) { 
     444        PJ_USE_EXCEPTION; 
     445 
     446        PJ_TRY { 
     447            tdata->buf.start = (char*)  
     448                               pj_pool_alloc(tdata->pool, PJSIP_MAX_PKT_LEN); 
     449        } 
     450        PJ_CATCH_ANY { 
     451            return PJ_ENOMEM; 
     452        } 
     453        PJ_END 
     454 
     455        tdata->buf.cur = tdata->buf.start; 
     456        tdata->buf.end = tdata->buf.start + PJSIP_MAX_PKT_LEN; 
     457    } 
     458 
     459    /* Do we need to reprint? */ 
     460    if (!pjsip_tx_data_is_valid(tdata)) { 
     461        pj_ssize_t size; 
     462 
     463        size = pjsip_msg_print( tdata->msg, tdata->buf.start,  
     464                                tdata->buf.end - tdata->buf.start); 
     465        if (size < 0) { 
     466            return PJSIP_EMSGTOOLONG; 
     467        } 
     468        pj_assert(size != 0); 
     469        tdata->buf.cur[size] = '\0'; 
     470        tdata->buf.cur += size; 
     471    } 
     472 
     473    return PJ_SUCCESS; 
     474} 
     475 
    437476PJ_DEF(pj_bool_t) pjsip_tx_data_is_valid( pjsip_tx_data *tdata ) 
    438477{ 
     
    568607static pj_status_t mod_on_tx_msg(pjsip_tx_data *tdata) 
    569608{ 
    570     /* Allocate buffer if necessary. */ 
    571     if (tdata->buf.start == NULL) { 
    572         PJ_USE_EXCEPTION; 
    573  
    574         PJ_TRY { 
    575             tdata->buf.start = (char*)  
    576                                pj_pool_alloc(tdata->pool, PJSIP_MAX_PKT_LEN); 
    577         } 
    578         PJ_CATCH_ANY { 
    579             return PJ_ENOMEM; 
    580         } 
    581         PJ_END 
    582  
    583         tdata->buf.cur = tdata->buf.start; 
    584         tdata->buf.end = tdata->buf.start + PJSIP_MAX_PKT_LEN; 
    585     } 
    586  
    587     /* Do we need to reprint? */ 
    588     if (!pjsip_tx_data_is_valid(tdata)) { 
    589         pj_ssize_t size; 
    590  
    591         size = pjsip_msg_print( tdata->msg, tdata->buf.start,  
    592                                 tdata->buf.end - tdata->buf.start); 
    593         if (size < 0) { 
    594             return PJSIP_EMSGTOOLONG; 
    595         } 
    596         pj_assert(size != 0); 
    597         tdata->buf.cur[size] = '\0'; 
    598         tdata->buf.cur += size; 
    599     } 
    600  
    601     return PJ_SUCCESS; 
     609    return pjsip_tx_data_encode(tdata); 
    602610} 
    603611 
Note: See TracChangeset for help on using the changeset viewer.