Changeset 1561 for pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
- Timestamp:
- Nov 8, 2007 9:24:30 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r1554 r1561 1564 1564 /* Include SDP when it's available for 2xx and 18x (but not 180) response. 1565 1565 * Subsequent response will include this SDP. 1566 * 1567 * Note note: 1568 * - When offer/answer has been completed in reliable 183, we MUST NOT 1569 * send SDP in 2xx response. So if we don't have SDP to send, clear 1570 * the SDP in the message body ONLY if 100rel is active in this 1571 * session. 1566 1572 */ 1567 1573 if (sdp) { 1568 1574 tdata->msg->body = create_sdp_body(tdata->pool, sdp); 1575 } else { 1576 if (inv->options & PJSIP_INV_REQUIRE_100REL) { 1577 tdata->msg->body = NULL; 1578 } 1569 1579 } 1570 1580 … … 2227 2237 pj_status_t status = -1; 2228 2238 2239 /* Handle 401/407 challenge. */ 2240 if (tsx->state == PJSIP_TSX_STATE_COMPLETED && 2241 (tsx->status_code == 401 || tsx->status_code == 407)) { 2242 2243 pjsip_tx_data *tdata; 2244 2245 status = pjsip_auth_clt_reinit_req( &inv->dlg->auth_sess, 2246 e->body.tsx_state.src.rdata, 2247 tsx->last_tx, 2248 &tdata); 2249 2250 if (status != PJ_SUCCESS) { 2251 2252 /* Does not have proper credentials. 2253 * End the session anyway. 2254 */ 2255 inv_set_cause(inv, PJSIP_SC_OK, NULL); 2256 inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e); 2257 2258 } else { 2259 /* Re-send BYE. */ 2260 status = pjsip_inv_send_msg(inv, tdata); 2261 } 2262 2229 2263 /* Process 2xx response */ 2230 if (tsx->state == PJSIP_TSX_STATE_COMPLETED &&2264 } else if (tsx->state == PJSIP_TSX_STATE_COMPLETED && 2231 2265 tsx->status_code/100 == 2 && 2232 2266 e->body.tsx_state.src.rdata->msg_info.msg->body)
Note: See TracChangeset
for help on using the changeset viewer.