Ignore:
Timestamp:
Mar 16, 2011 7:34:16 AM (13 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/ssl_sock_ossl.c

    r3225 r3455  
    268268/* OpenSSL library initialization counter */ 
    269269static int openssl_init_count; 
    270 static int openssl_reg_strerr; 
    271270 
    272271/* OpenSSL available ciphers */ 
     
    281280static pj_status_t init_openssl(void) 
    282281{ 
     282    pj_status_t status; 
     283 
    283284    if (openssl_init_count) 
    284285        return PJ_SUCCESS; 
     
    287288 
    288289    /* Register error subsystem */ 
    289     if (!openssl_reg_strerr) { 
    290         pj_status_t status; 
    291  
    292         openssl_reg_strerr = 1; 
    293         status = pj_register_strerror(PJ_SSL_ERRNO_START,  
    294                                       PJ_SSL_ERRNO_SPACE_SIZE,  
    295                                       &ssl_strerror); 
    296         pj_assert(status == PJ_SUCCESS); 
    297     } 
     290    status = pj_register_strerror(PJ_SSL_ERRNO_START,  
     291                                  PJ_SSL_ERRNO_SPACE_SIZE,  
     292                                  &ssl_strerror); 
     293    pj_assert(status == PJ_SUCCESS); 
    298294 
    299295    /* Init OpenSSL lib */ 
Note: See TracChangeset for help on using the changeset viewer.