Ignore:
Timestamp:
Sep 6, 2018 10:20:24 AM (6 years ago)
Author:
ming
Message:

Re #2147 (misc): Fix incorrect call state info on incoming call in PJSUA2
In PJSUA2, due to ticket #1916, on_incoming_call() can be called earlier, during on_create_media_transport().

At this time, call->inv->state is still INV_STATE_NULL (instead of INV_STATE_INCOMING).

This patch only fixes the call info, but doesn't change the invite state itself.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r5834 r5882  
    19681968    if (call->inv) { 
    19691969        info->state = call->inv->state; 
     1970        if (call->inv->role == PJSIP_ROLE_UAS && 
     1971            info->state == PJSIP_INV_STATE_NULL) 
     1972        { 
     1973            info->state = PJSIP_INV_STATE_INCOMING; 
     1974        } 
    19701975    } else if (call->async_call.dlg && call->last_code==0) { 
    19711976        info->state = PJSIP_INV_STATE_NULL; 
Note: See TracChangeset for help on using the changeset viewer.