Skip to content

Commit

Permalink
Misc (re #1751): added additional checking to invite and dialog insta…
Browse files Browse the repository at this point in the history
…nces when terminating the call when media initialization fails due to suspected crash

git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4856 74dad513-b988-da41-8d7b-12977e46ad98
  • Loading branch information
bennylp committed Jun 5, 2014
1 parent 8e7e929 commit 4be273a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pjsip/src/pjsua-lib/pjsua_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -1381,15 +1381,19 @@ pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata)
* a response message and terminate the invite here.
*/
pjsip_dlg_respond(dlg, rdata, sip_err_code, NULL, NULL, NULL);
pjsip_inv_terminate(call->inv, sip_err_code, PJ_FALSE);
if (call->inv && call->inv->dlg) {
pjsip_inv_terminate(call->inv, sip_err_code, PJ_FALSE);
}
call->inv = NULL;
call->async_call.dlg = NULL;
goto on_return;
}
} else if (status != PJ_EPENDING) {
pjsua_perror(THIS_FILE, "Error initializing media channel", status);
pjsip_dlg_respond(dlg, rdata, sip_err_code, NULL, NULL, NULL);
pjsip_inv_terminate(call->inv, sip_err_code, PJ_FALSE);
if (call->inv && call->inv->dlg) {
pjsip_inv_terminate(call->inv, sip_err_code, PJ_FALSE);
}
call->inv = NULL;
call->async_call.dlg = NULL;
goto on_return;
Expand Down

0 comments on commit 4be273a

Please sign in to comment.