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 /pjmedia/src | |
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 'pjmedia/src')
-rw-r--r-- | pjmedia/src/pjmedia/errno.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pjmedia/src/pjmedia/errno.c b/pjmedia/src/pjmedia/errno.c index e6eeccdf..5a63e07e 100644 --- a/pjmedia/src/pjmedia/errno.c +++ b/pjmedia/src/pjmedia/errno.c @@ -26,6 +26,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; @@ -121,6 +124,8 @@ static const struct { PJMEDIA_EWAVETOOSHORT, "WAVE file too short" }, }; +#endif /* PJ_HAS_ERROR_STRING */ + /* @@ -131,6 +136,8 @@ PJ_DEF(pj_str_t) pjmedia_strerror( pj_status_t statcode, { pj_str_t errstr; +#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0) + /* See if the error comes from PortAudio. */ if (statcode >= PJMEDIA_ERRNO_FROM_PORTAUDIO(paNotInitialized) && statcode < PJMEDIA_ERRNO_FROM_PORTAUDIO(paNotInitialized + 10000)) @@ -184,10 +191,12 @@ PJ_DEF(pj_str_t) pjmedia_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 pjmedia error %d", statcode); return errstr; |