- Timestamp:
- Sep 11, 2008 8:00:47 AM (16 years ago)
- Location:
- pjproject/trunk/pjsip/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip-ua/sip_100rel.c
r2039 r2271 418 418 pj_status_t status; 419 419 420 dd = (dlg_data*) inv->dlg->mod_data[mod_100rel.mod.id];421 PJ_ASSERT_RETURN(dd != NULL, PJSIP_ENOTINITIALIZED);422 423 420 tsx = pjsip_rdata_get_tsx(rdata); 424 421 pj_assert(tsx != NULL); 425 422 426 423 msg = rdata->msg_info.msg; 424 425 dd = (dlg_data*) inv->dlg->mod_data[mod_100rel.mod.id]; 426 if (dd == NULL) { 427 /* UAC sends us PRACK while we didn't send reliable provisional 428 * response. Respond with 400 (?) 429 */ 430 const pj_str_t reason = pj_str("Unexpected PRACK"); 431 432 status = pjsip_dlg_create_response(inv->dlg, rdata, 400, 433 &reason, &tdata); 434 if (status == PJ_SUCCESS) { 435 status = pjsip_dlg_send_response(inv->dlg, tsx, tdata); 436 } 437 return PJSIP_ENOTINITIALIZED; 438 } 427 439 428 440 /* Always reply with 200/OK for PRACK */ -
pjproject/trunk/pjsip/src/pjsip/sip_dialog.c
r2194 r2271 1697 1697 * The workaround for this is to take the To tag received in the 1698 1698 * 2xx response and set it as remote tag. 1699 * 1700 * New update: 1701 * We also need to update the dialog for 1xx responses, to handle the 1702 * case when 100rel is used, otherwise PRACK will be sent to the 1703 * wrong target. 1699 1704 */ 1700 1705 if ((dlg->state == PJSIP_DIALOG_STATE_NULL && … … 1705 1710 (dlg->role==PJSIP_ROLE_UAC && 1706 1711 !dlg->uac_has_2xx && 1707 res_code/100 == 2 &&1712 res_code/100 <= 2 && 1708 1713 pjsip_method_creates_dialog(&rdata->msg_info.cseq->method) && 1709 1714 pj_strcmp(&dlg->remote.info->tag, &rdata->msg_info.to->tag)))
Note: See TracChangeset
for help on using the changeset viewer.