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/pjmedia/src/pjmedia/endpoint.c

    r3360 r3455  
    4444 
    4545 
    46 /* Flag to indicate whether pjmedia error subsystem has been registered 
    47  * to pjlib. 
    48  */ 
    49 static int error_subsys_registered; 
    50  
    5146/* Config to control rtpmap inclusion for static payload types */ 
    5247pj_bool_t pjmedia_add_rtpmap_for_static_pt =  
     
    106101    pj_status_t status; 
    107102 
    108     if (!error_subsys_registered) { 
    109         pj_register_strerror(PJMEDIA_ERRNO_START, PJ_ERRNO_SPACE_SIZE,  
    110                              &pjmedia_strerror); 
    111         error_subsys_registered = 1; 
    112     } 
     103    status = pj_register_strerror(PJMEDIA_ERRNO_START, PJ_ERRNO_SPACE_SIZE, 
     104                                  &pjmedia_strerror); 
     105    pj_assert(status == PJ_SUCCESS); 
    113106 
    114107    PJ_ASSERT_RETURN(pf && p_endpt, PJ_EINVAL); 
Note: See TracChangeset for help on using the changeset viewer.