Changeset 3361


Ignore:
Timestamp:
Nov 3, 2010 6:48:58 AM (14 years ago)
Author:
bennylp
Message:

Fixed #1155 (Run-time option to disable the use of "rport" in outgoing requests (thanks Marcus Froeschl for the suggestion)

Location:
pjproject/trunk/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip/sip_config.h

    r3329 r3361  
    7878        pj_bool_t allow_port_in_fromto_hdr; 
    7979 
     80        /** 
     81         * Disable rport in request. 
     82         */ 
     83        pj_bool_t disable_rport; 
    8084    } endpt; 
    8185 
  • pjproject/trunk/pjsip/src/pjsip/sip_util.c

    r3323 r3361  
    246246    /* Add a blank Via header in the front of the message. */ 
    247247    via = pjsip_via_hdr_create(tdata->pool); 
    248     via->rport_param = 0; 
     248    via->rport_param = pjsip_cfg()->endpt.disable_rport ? -1 : 0; 
    249249    pjsip_msg_insert_first_hdr(msg, (pjsip_hdr*)via); 
    250250 
     
    11801180        via->transport = pj_str(stateless_data->cur_transport->type_name); 
    11811181        via->sent_by = stateless_data->cur_transport->local_name; 
    1182         via->rport_param = 0; 
     1182        via->rport_param = pjsip_cfg()->endpt.disable_rport ? -1 : 0; 
    11831183 
    11841184        pjsip_tx_data_invalidate_msg(tdata); 
Note: See TracChangeset for help on using the changeset viewer.