Ignore:
Timestamp:
Mar 16, 2011 7:34:16 AM (14 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/src/pj/errno.c

    r3255 r3455  
    129129            IN_RANGE(start+space-1, err_msg_hnd[i].begin, err_msg_hnd[i].end)) 
    130130        { 
     131            if (err_msg_hnd[i].begin == start &&  
     132                err_msg_hnd[i].end == (start+space) && 
     133                err_msg_hnd[i].strerror == f) 
     134            { 
     135                /* The same range and handler has already been registered */ 
     136                return PJ_SUCCESS; 
     137            } 
     138 
    131139            return PJ_EEXISTS; 
    132140        } 
Note: See TracChangeset for help on using the changeset viewer.