diff options
Diffstat (limited to 'pjsip/src/pjsip-simple')
-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; |