Changeset 4273 for pjproject/trunk


Ignore:
Timestamp:
Oct 2, 2012 2:47:08 AM (12 years ago)
Author:
bennylp
Message:

Fixed #1588: State PJSIP_INV_STATE_NULL is called after call has been disconnected

File:
1 edited

Legend:

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

    r4269 r4273  
    360360    unsigned options = 0; 
    361361    pjsip_tx_data *tdata; 
     362    pj_bool_t cb_called = PJ_FALSE; 
    362363    pj_status_t status = (info? info->status: PJ_SUCCESS); 
    363364 
     
    477478    status = pjsip_inv_send_msg(inv, tdata); 
    478479    if (status != PJ_SUCCESS) { 
    479         pjsua_perror(THIS_FILE, "Unable to send initial INVITE request",  
    480                      status); 
     480        cb_called = PJ_TRUE; 
    481481 
    482482        /* Upon failure to send first request, the invite  
     
    495495 
    496496on_error: 
    497     if (inv == NULL && call_id != -1 && pjsua_var.ua_cfg.cb.on_call_state) 
     497    if (inv == NULL && call_id != -1 && !cb_called && 
     498        pjsua_var.ua_cfg.cb.on_call_state) 
     499    { 
    498500        (*pjsua_var.ua_cfg.cb.on_call_state)(call_id, NULL); 
     501    } 
    499502 
    500503    if (dlg) { 
Note: See TracChangeset for help on using the changeset viewer.