Changeset 3303


Ignore:
Timestamp:
Sep 7, 2010 5:10:25 AM (9 years ago)
Author:
ming
Message:

Fixed #1118: Add last error code to PJSUA-LIB account info structure

Location:
pjproject/trunk/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r3243 r3303  
    23422342 
    23432343    /** 
     2344     * Last registration error code. When the status field contains a SIP 
     2345     * status code that indicates a registration failure, last registration 
     2346     * error code contains the error code that causes the failure. In any 
     2347     * other case, its value is zero. 
     2348     */ 
     2349    pj_status_t         reg_last_err; 
     2350 
     2351    /** 
    23442352     * String describing the registration status. 
    23452353     */ 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r3222 r3303  
    18001800        info->online_status_text = pj_str("Offline"); 
    18011801 
    1802     if (acc->reg_last_err) { 
    1803         info->status = (pjsip_status_code) acc->reg_last_err; 
    1804         pj_strerror(acc->reg_last_err, info->buf_, sizeof(info->buf_)); 
    1805         info->status_text = pj_str(info->buf_); 
    1806     } else if (acc->reg_last_code) { 
     1802    if (acc->reg_last_code) { 
    18071803        if (info->has_registration) { 
    18081804            info->status = (pjsip_status_code) acc->reg_last_code; 
    18091805            info->status_text = *pjsip_get_status_text(acc->reg_last_code); 
     1806            if (acc->reg_last_err) 
     1807                info->reg_last_err = acc->reg_last_err; 
    18101808        } else { 
    18111809            info->status = (pjsip_status_code) 0; 
Note: See TracChangeset for help on using the changeset viewer.