Ignore:
Timestamp:
Mar 16, 2011 7:34:16 AM (11 years ago)
Author:
nanang
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/src/pjlib-util/errno.c

    r3087 r3455  
    2020#include <pjlib-util/errno.h> 
    2121#include <pjlib-util/types.h> 
     22#include <pj/assert.h> 
    2223#include <pj/string.h> 
    2324 
     
    163164PJ_DEF(pj_status_t) pjlib_util_init(void) 
    164165{ 
    165     return pj_register_strerror(PJLIB_UTIL_ERRNO_START,  
    166                                 PJ_ERRNO_SPACE_SIZE,  
    167                                 &pjlib_util_strerror); 
     166    pj_status_t status; 
     167     
     168    status = pj_register_strerror(PJLIB_UTIL_ERRNO_START,  
     169                                  PJ_ERRNO_SPACE_SIZE,  
     170                                  &pjlib_util_strerror); 
     171    pj_assert(status == PJ_SUCCESS); 
     172 
     173    return PJ_SUCCESS; 
    168174} 
Note: See TracChangeset for help on using the changeset viewer.