Ignore:
Timestamp:
Mar 18, 2006 12:26:55 PM (18 years ago)
Author:
bennylp
Message:

Added option to disable error message altogether, to save space footprint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_errno.c

    r315 r330  
    2525 * MUST KEEP THIS ARRAY SORTED!! 
    2626 */ 
     27 
     28#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0) 
     29 
    2730static const struct  
    2831{ 
     
    9295 
    9396 
     97#endif  /* PJ_HAS_ERROR_STRING */ 
     98 
     99 
    94100/* 
    95101 * pjsip_strerror() 
     
    99105{ 
    100106    pj_str_t errstr; 
     107 
     108#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0) 
    101109 
    102110    if (statcode >= PJSIP_ERRNO_START && statcode < PJSIP_ERRNO_START+800)  
     
    145153            return errstr; 
    146154 
    147         } else { 
    148             /* Error not found. */ 
    149             errstr.ptr = buf; 
    150             errstr.slen = pj_ansi_snprintf(buf, bufsize,  
    151                                            "Unknown error %d", 
    152                                            statcode); 
     155        }  
     156    } 
    153157 
    154             return errstr; 
    155         } 
    156     } 
    157     else { 
    158         /* Not our code. Give it to PJLIB. */ 
    159         return pj_strerror(statcode, buf, bufsize); 
    160     } 
     158#endif  /* PJ_HAS_ERROR_STRING */ 
     159 
     160    /* Error not found. */ 
     161    errstr.ptr = buf; 
     162    errstr.slen = pj_ansi_snprintf(buf, bufsize,  
     163                                   "Unknown pjsip error %d", 
     164                                   statcode); 
     165 
     166    return errstr; 
    161167 
    162168} 
Note: See TracChangeset for help on using the changeset viewer.