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/pjsip/src/pjsip/sip_endpoint.c

    r3106 r3455  
    118118 
    119119 
    120 /* Specifies whether error subsystem has been registered to pjlib. */ 
    121 static int error_subsys_initialized; 
    122  
    123120/* 
    124121 * This is the global handler for memory allocation failure, for pools that 
     
    426423 
    427424 
    428     if (!error_subsys_initialized) { 
    429         pj_register_strerror(PJSIP_ERRNO_START, PJ_ERRNO_SPACE_SIZE, 
    430                              &pjsip_strerror); 
    431         error_subsys_initialized = 1; 
    432     } 
     425    status = pj_register_strerror(PJSIP_ERRNO_START, PJ_ERRNO_SPACE_SIZE, 
     426                                  &pjsip_strerror); 
     427    pj_assert(status == PJ_SUCCESS); 
    433428 
    434429    PJ_LOG(5, (THIS_FILE, "Creating endpoint instance...")); 
Note: See TracChangeset for help on using the changeset viewer.