diff options
author | Benny Prijono <bennylp@teluu.com> | 2012-10-02 02:47:08 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2012-10-02 02:47:08 +0000 |
commit | 178281a14c680494e56a6de9c33d928246a8419e (patch) | |
tree | 04df43df2a9eabfa52dbd9b95e035b3db025cfec | |
parent | 9bbfecd2bde8adbd85efa944c12ffa95565a605c (diff) |
Fixed #1588: State PJSIP_INV_STATE_NULL is called after call has been disconnected
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4273 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_call.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c index d5856f5b..36bc8985 100644 --- a/pjsip/src/pjsua-lib/pjsua_call.c +++ b/pjsip/src/pjsua-lib/pjsua_call.c @@ -359,6 +359,7 @@ on_make_call_med_tp_complete(pjsua_call_id call_id, pjsip_dialog *dlg = call->async_call.dlg; unsigned options = 0; pjsip_tx_data *tdata; + pj_bool_t cb_called = PJ_FALSE; pj_status_t status = (info? info->status: PJ_SUCCESS); PJSUA_LOCK(); @@ -476,8 +477,7 @@ on_make_call_med_tp_complete(pjsua_call_id call_id, status = pjsip_inv_send_msg(inv, tdata); if (status != PJ_SUCCESS) { - pjsua_perror(THIS_FILE, "Unable to send initial INVITE request", - status); + cb_called = PJ_TRUE; /* Upon failure to send first request, the invite * session would have been cleared. @@ -494,8 +494,11 @@ on_make_call_med_tp_complete(pjsua_call_id call_id, return PJ_SUCCESS; on_error: - if (inv == NULL && call_id != -1 && pjsua_var.ua_cfg.cb.on_call_state) + if (inv == NULL && call_id != -1 && !cb_called && + pjsua_var.ua_cfg.cb.on_call_state) + { (*pjsua_var.ua_cfg.cb.on_call_state)(call_id, NULL); + } if (dlg) { /* This may destroy the dialog */ |