Changeset 4135 for pjproject/trunk


Ignore:
Timestamp:
May 22, 2012 3:33:04 AM (12 years ago)
Author:
bennylp
Message:

Fixed second problem in re #1514: NULL state is reported instead of DISCONNECTED state if call is disconnected due to transport (ICE) initialization error

File:
1 edited

Legend:

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

    r4118 r4135  
    373373 
    374374    if (status != PJ_SUCCESS) { 
     375        pj_str_t err_str; 
     376        int title_len; 
     377 
     378        call->last_code = PJSIP_SC_PRECONDITION_FAILURE; 
     379        pj_strcpy2(&call->last_text, "Media init error: "); 
     380 
     381        title_len = call->last_text.slen; 
     382        err_str = pj_strerror(status, call->last_text_buf_ + title_len, 
     383                              sizeof(call->last_text_buf_) - title_len); 
     384        call->last_text.slen += err_str.slen; 
     385 
    375386        pjsua_perror(THIS_FILE, "Error initializing media channel", status); 
    376387        goto on_error; 
     
    15731584    if (call->inv) { 
    15741585        info->state = call->inv->state; 
    1575     } else if (call->async_call.dlg) { 
     1586    } else if (call->async_call.dlg && call->last_code==0) { 
    15761587        info->state = PJSIP_INV_STATE_NULL; 
    15771588    } else { 
Note: See TracChangeset for help on using the changeset viewer.