From 2a9988f3e4c9b8d40ffebaa4427908de29324711 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Wed, 16 Mar 2011 07:34:16 +0000 Subject: Fix #1212: - Updated pj_register_strerror() to just return PJ_SUCCESS when the same range and handler is being re-registered. - Removed the usage of static flag of error string handler registration in some modules, which prevent the re-registration of the handler, e.g: in restarting pjsua, as such flags never got reseted. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3455 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib-util/src/pjlib-util/errno.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'pjlib-util') diff --git a/pjlib-util/src/pjlib-util/errno.c b/pjlib-util/src/pjlib-util/errno.c index 9e726d12..7594431b 100644 --- a/pjlib-util/src/pjlib-util/errno.c +++ b/pjlib-util/src/pjlib-util/errno.c @@ -19,6 +19,7 @@ */ #include #include +#include #include @@ -162,7 +163,12 @@ pj_str_t pjlib_util_strerror(pj_status_t statcode, PJ_DEF(pj_status_t) pjlib_util_init(void) { - return pj_register_strerror(PJLIB_UTIL_ERRNO_START, - PJ_ERRNO_SPACE_SIZE, - &pjlib_util_strerror); + pj_status_t status; + + status = pj_register_strerror(PJLIB_UTIL_ERRNO_START, + PJ_ERRNO_SPACE_SIZE, + &pjlib_util_strerror); + pj_assert(status == PJ_SUCCESS); + + return PJ_SUCCESS; } -- cgit v1.2.3