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/pjnath/src/pjnath/errno.c

    r2724 r3455  
    2020#include <pjnath/errno.h> 
    2121#include <pjnath/stun_msg.h> 
     22#include <pj/assert.h> 
    2223#include <pj/log.h> 
    2324#include <pj/string.h> 
     
    177178    status = pj_register_strerror(PJNATH_ERRNO_START, 299,  
    178179                                  &pjnath_strerror); 
    179     if (status != PJ_SUCCESS) 
    180         return status; 
     180    pj_assert(status == PJ_SUCCESS); 
    181181 
    182182    status = pj_register_strerror(PJ_STATUS_FROM_STUN_CODE(300),  
    183183                                  699 - 300,  
    184184                                  &pjnath_strerror2); 
    185     return status; 
     185    pj_assert(status == PJ_SUCCESS); 
     186 
     187    return PJ_SUCCESS; 
    186188} 
    187189 
Note: See TracChangeset for help on using the changeset viewer.