Changeset 4269 for pjproject/trunk
- Timestamp:
- Sep 28, 2012 10:07:22 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r4268 r4269 812 812 pjsip_inv_session *replaced_inv; 813 813 struct pjsua_call *replaced_call; 814 pjsip_tx_data *tdata ;815 pj_status_t status ;814 pjsip_tx_data *tdata = NULL; 815 pj_status_t status = PJ_SUCCESS; 816 816 817 817 /* Get the invite session in the dialog */ … … 829 829 replaced_call->inv->role != PJSIP_ROLE_UAC) 830 830 { 831 /* Replaced call is not in confirmed state yet and we are not 832 * the call initiator, should not answer with 200 response here. 833 */ 831 if (replaced_call->last_code > 100 && replaced_call->last_code < 200) 832 { 833 pjsip_status_code code = replaced_call->last_code; 834 pj_str_t *text = &replaced_call->last_text; 835 836 PJ_LOG(4,(THIS_FILE, "Answering replacement call %d with %d/%.*s", 837 call->index, code, text->slen, text->ptr)); 838 839 /* Answer the new call with last response in the replaced call */ 840 status = pjsip_inv_answer(call->inv, code, text, NULL, &tdata); 841 } 834 842 } else { 835 843 PJ_LOG(4,(THIS_FILE, "Answering replacement call %d with 200/OK", … … 840 848 } 841 849 842 if (status == PJ_SUCCESS )850 if (status == PJ_SUCCESS && tdata) 843 851 status = pjsip_inv_send_msg(call->inv, tdata); 844 852
Note: See TracChangeset
for help on using the changeset viewer.