summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2012-03-30 06:18:50 +0000
committerLiong Sauw Ming <ming@teluu.com>2012-03-30 06:18:50 +0000
commit5c91d041b38be061c31f0f679baffe949b8a7466 (patch)
treef0560a81ea45599a093e4b11c2dbd0f24ef6679f
parent11c5ee4fb0231483b314c898841f4c80f6fbc9b3 (diff)
Re #1446 (misc fix): Fix call info to display correct invite state
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3996 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip/src/pjsua-lib/pjsua_call.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c
index 4a6f1173..6a4e4dc7 100644
--- a/pjsip/src/pjsua-lib/pjsua_call.c
+++ b/pjsip/src/pjsua-lib/pjsua_call.c
@@ -1541,7 +1541,13 @@ PJ_DEF(pj_status_t) pjsua_call_get_info( pjsua_call_id call_id,
pj_memcpy(&info->setting, &call->opt, sizeof(call->opt));
/* state, state_text */
- info->state = (call->inv? call->inv->state: PJSIP_INV_STATE_DISCONNECTED);
+ if (call->inv) {
+ info->state = call->inv->state;
+ } else if (call->async_call.dlg) {
+ info->state = PJSIP_INV_STATE_NULL;
+ } else {
+ info->state = PJSIP_INV_STATE_DISCONNECTED;
+ }
info->state_text = pj_str((char*)pjsip_inv_state_name(info->state));
/* If call is disconnected, set the last_status from the cause code */