diff --git a/src/include/switch_apr.h b/src/include/switch_apr.h index f2af8bc24b..a49487c5e2 100644 --- a/src/include/switch_apr.h +++ b/src/include/switch_apr.h @@ -1483,8 +1483,14 @@ SWITCH_DECLARE(switch_status_t) switch_thread_exit(switch_thread_t *thd, switch_ */ SWITCH_DECLARE(switch_status_t) switch_thread_join(switch_status_t *retval, switch_thread_t *thd); - /** @} */ +/** + * Return a human readable string describing the specified error. + * @param statcode The error code the get a string for. + * @param buf A buffer to hold the error string. + * @bufsize Size of the buffer to hold the string. + */ +SWITCH_DECLARE(char *) switch_strerror(switch_status_t statcode, char *buf, switch_size_t bufsize); diff --git a/src/switch_apr.c b/src/switch_apr.c index 329bbeee37..4443c4c7f9 100644 --- a/src/switch_apr.c +++ b/src/switch_apr.c @@ -1223,6 +1223,10 @@ SWITCH_DECLARE(int) switch_atomic_dec(volatile switch_atomic_t *mem) #endif } +SWITCH_DECLARE(char *) switch_strerror(switch_status_t statcode, char *buf, switch_size_t bufsize) +{ + return apr_strerror(statcode, buf, bufsize); +} /* For Emacs: * Local Variables: