Ignore:
Timestamp:
May 18, 2009 11:18:38 AM (15 years ago)
Author:
bennylp
Message:

More ticket #831:

  • fixed Via address unchanged when switching transport
  • reset transaction retransmit count and timeout timer when retrying
  • handle case when TCP transport is not available
  • added macro PJSIP_UDP_SIZE_THRESHOLD
  • added API to encode transmit data (to avoid using stack when checking message size)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/sipit24/pjsip/src/pjsip/sip_util.c

    r2703 r2710  
    11361136        via->rport_param = 0; 
    11371137 
     1138        pjsip_tx_data_invalidate_msg(tdata); 
     1139 
    11381140        /* Send message using this transport. */ 
    11391141        status = pjsip_transport_send( stateless_data->cur_transport, 
     
    11921194        addr->entry[0].type == PJSIP_TRANSPORT_UDP) 
    11931195    { 
    1194         char buf[1500]; 
    11951196        int len; 
    11961197 
     1198        /* Encode the request */ 
     1199        status = pjsip_tx_data_encode(stateless_data->tdata); 
     1200        if (status != PJ_SUCCESS) { 
     1201            if (stateless_data->app_cb) { 
     1202                pj_bool_t cont = PJ_FALSE; 
     1203                (*stateless_data->app_cb)(stateless_data, -status, &cont); 
     1204            } 
     1205            pjsip_tx_data_dec_ref(stateless_data->tdata); 
     1206            return; 
     1207        } 
     1208 
    11971209        /* Check if request message is larger than 1300 bytes. */ 
    1198         len = pjsip_msg_print(stateless_data->tdata->msg, buf, 1300); 
    1199         if (len < 0) { 
     1210        len = stateless_data->tdata->buf.end -  
     1211                stateless_data->tdata->buf.start; 
     1212        if (len >= PJSIP_UDP_SIZE_THRESHOLD) { 
    12001213            int i; 
    12011214            int count = stateless_data->addr.count; 
Note: See TracChangeset for help on using the changeset viewer.