- Timestamp:
- Oct 8, 2019 8:32:53 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_util.c
r5733 r6088 1106 1106 PJ_UNUSED_ARG(tdata); 1107 1107 pj_assert(tdata == stateless_data->tdata); 1108 pj_status_t need_update_via = PJ_TRUE; 1108 1109 1109 1110 for (;;) { … … 1202 1203 } 1203 1204 1205 if (tdata->msg->line.req.method.id == PJSIP_CANCEL_METHOD) { 1206 if (via->sent_by.host.slen > 0) { 1207 /* Don't update Via header on a CANCEL request if the sent-by 1208 * parameter is already set since it needs to match the 1209 * original request. */ 1210 need_update_via = PJ_FALSE; 1211 } 1212 } 1213 1204 1214 if (via->branch_param.slen == 0) { 1205 1215 pj_str_t tmp; … … 1214 1224 } 1215 1225 1216 /* For CANCEL request, do not update the Via header since it needs 1217 * to match the original request. 1218 */ 1219 if (tdata->msg->line.req.method.id != PJSIP_CANCEL_METHOD) { 1226 if (need_update_via) { 1220 1227 via->transport = pj_str(stateless_data->cur_transport->type_name); 1221 1228
Note: See TracChangeset
for help on using the changeset viewer.