diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-03-18 12:26:55 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-03-18 12:26:55 +0000 |
commit | 1ef58d201f4613f91a9cbafa4545f37f3fab3cf6 (patch) | |
tree | 7169f9c55ab05f6140bc6f2faa0d583166b1eb94 /pjsip/src/pjsip-simple/errno.c | |
parent | f8793f52a83dd232eddf2bb61f48cca6dd759ffd (diff) |
Added option to disable error message altogether, to save space footprint
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@330 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsip-simple/errno.c')
-rw-r--r-- | pjsip/src/pjsip-simple/errno.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pjsip/src/pjsip-simple/errno.c b/pjsip/src/pjsip-simple/errno.c index a2e588d9..3f5c2e6b 100644 --- a/pjsip/src/pjsip-simple/errno.c +++ b/pjsip/src/pjsip-simple/errno.c @@ -23,6 +23,9 @@ * MUST KEEP THIS ARRAY SORTED!! * Message must be limited to 64 chars! */ + +#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0) + static const struct { int code; @@ -46,6 +49,8 @@ static const struct }; +#endif /* PJ_HAS_ERROR_STRING */ + /* * pjsipsimple_strerror() @@ -55,6 +60,8 @@ PJ_DEF(pj_str_t) pjsipsimple_strerror( pj_status_t statcode, { pj_str_t errstr; +#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0) + if (statcode >= PJSIP_SIMPLE_ERRNO_START && statcode < PJSIP_SIMPLE_ERRNO_START + PJ_ERRNO_SPACE_SIZE) { @@ -93,10 +100,13 @@ PJ_DEF(pj_str_t) pjsipsimple_strerror( pj_status_t statcode, } } +#endif /* PJ_HAS_ERROR_STRING */ + + /* Error not found. */ errstr.ptr = buf; errstr.slen = pj_ansi_snprintf(buf, bufsize, - "Unknown error %d", + "Unknown pjsip-simple error %d", statcode); return errstr; |