Changeset 738 for pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
- Timestamp:
- Sep 25, 2006 1:40:12 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r671 r738 615 615 /* Incompatible media */ 616 616 code = PJSIP_SC_NOT_ACCEPTABLE_HERE; 617 status = PJSIP_ERRNO_FROM_SIP_STATUS(code);618 617 619 618 if (p_tdata) { … … 2415 2414 /* Process SDP in the answer */ 2416 2415 status = process_answer(inv, 200, tdata, NULL); 2417 if (status != PJ_SUCCESS) 2416 2417 if (status != PJ_SUCCESS) { 2418 /* 2419 * SDP negotiation has failed. 2420 */ 2421 pj_status_t rc; 2422 pj_str_t reason; 2423 2424 /* Delete the 2xx answer */ 2425 pjsip_tx_data_dec_ref(tdata); 2426 2427 /* Create 500 response */ 2428 reason = pj_str("SDP negotiation failed"); 2429 rc = pjsip_dlg_create_response(dlg, rdata, 500, &reason, 2430 &tdata); 2431 if (rc == PJ_SUCCESS) { 2432 pjsip_warning_hdr *w; 2433 const pj_str_t *endpt_name; 2434 2435 endpt_name = pjsip_endpt_name(dlg->endpt); 2436 w = pjsip_warning_hdr_create_from_status(tdata->pool, 2437 endpt_name, 2438 status); 2439 if (w) 2440 pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)w); 2441 2442 pjsip_inv_send_msg(inv, tdata); 2443 } 2418 2444 return; 2419 2445 } 2446 2447 /* Send 2xx regardless of the status of negotiation */ 2420 2448 status = pjsip_inv_send_msg(inv, tdata); 2421 2449
Note: See TracChangeset
for help on using the changeset viewer.