Changeset 3999 for pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
- Timestamp:
- Mar 30, 2012 7:10:13 AM (12 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk
-
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r3878 r3999 213 213 */ 214 214 if (state == PJSIP_INV_STATE_CONFIRMED) { 215 if (pjmedia_sdp_neg_get_state(inv->neg)!=PJMEDIA_SDP_NEG_STATE_DONE) { 215 struct tsx_inv_data *tsx_inv_data = NULL; 216 217 if (inv->invite_tsx) { 218 tsx_inv_data = (struct tsx_inv_data*) 219 inv->invite_tsx->mod_data[mod_inv.mod.id]; 220 } 221 222 if (pjmedia_sdp_neg_get_state(inv->neg)!=PJMEDIA_SDP_NEG_STATE_DONE && 223 (tsx_inv_data && !tsx_inv_data->sdp_done) ) 224 { 216 225 pjsip_tx_data *bye; 217 226 … … 3955 3964 } else if (tsx->role == PJSIP_ROLE_UAS && 3956 3965 tsx->state == PJSIP_TSX_STATE_TRYING && 3966 pjsip_method_cmp(&tsx->method, &pjsip_invite_method)==0) 3967 { 3968 pjsip_rx_data *rdata = e->body.tsx_state.src.rdata; 3969 pjsip_tx_data *tdata; 3970 pj_status_t status; 3971 3972 /* See https://trac.pjsip.org/repos/ticket/1455 3973 * Handle incoming re-INVITE before current INVITE is confirmed. 3974 * According to RFC 5407: 3975 * - answer with 200 if we don't have pending offer-answer 3976 * - answer with 491 if we *have* pending offer-answer 3977 * 3978 * But unfortunately accepting the re-INVITE would mean we have 3979 * two outstanding INVITEs, and we don't support that because 3980 * we will get confused when we handle the ACK. 3981 */ 3982 status = pjsip_dlg_create_response(inv->dlg, rdata, 3983 PJSIP_SC_REQUEST_PENDING, 3984 NULL, &tdata); 3985 if (status != PJ_SUCCESS) 3986 return; 3987 pjsip_timer_update_resp(inv, tdata); 3988 status = pjsip_dlg_send_response(dlg, tsx, tdata); 3989 3990 } else if (tsx->role == PJSIP_ROLE_UAS && 3991 tsx->state == PJSIP_TSX_STATE_TRYING && 3957 3992 pjsip_method_cmp(&tsx->method, &pjsip_update_method)==0) 3958 3993 { … … 3987 4022 /* Generic handling for UAC tsx completion */ 3988 4023 handle_uac_tsx_response(inv, e); 4024 3989 4025 } 3990 4026
Note: See TracChangeset
for help on using the changeset viewer.