diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2009-11-06 13:31:37 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2009-11-06 13:31:37 +0000 |
commit | 5ad076e71b93972ac204bfae7749695f04e59ab0 (patch) | |
tree | 8e5e3b34396d937cd85eb01da2a8f9bea5076844 /pjlib/src/pj/ssl_sock_ossl.c | |
parent | c7909ede03c0e1c8ca16812879a001cde325e158 (diff) |
Ticket #957:
- Updated Symbian PJLIB test build setting to enable SSL sock test.
- Fixed ciphers enumeration in Symbian SSL sock.
- Fixed OpenSSL SSL sock to avoid initializing OpenSSL multiple times.
- Fixed SSL unit test to avoid divide-by-zero in setting random seed.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2990 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/ssl_sock_ossl.c')
-rw-r--r-- | pjlib/src/pj/ssl_sock_ossl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pjlib/src/pj/ssl_sock_ossl.c b/pjlib/src/pj/ssl_sock_ossl.c index 76c321aa..9c016a3a 100644 --- a/pjlib/src/pj/ssl_sock_ossl.c +++ b/pjlib/src/pj/ssl_sock_ossl.c @@ -248,7 +248,7 @@ static pj_str_t ssl_strerror(pj_status_t status, errstr.ptr = buf; errstr.slen = pj_ansi_snprintf(buf, bufsize, - "Unknown OpenSSL error %d", + "Unknown OpenSSL error %ul", ssl_err); return errstr; @@ -267,9 +267,11 @@ static unsigned openssl_cipher_num; /* Initialize OpenSSL */ static pj_status_t init_openssl(void) { - if (++openssl_init_count != 1) + if (openssl_init_count) return PJ_SUCCESS; + openssl_init_count = 1; + /* Register error subsystem */ if (!openssl_reg_strerr) { pj_status_t status; @@ -334,8 +336,7 @@ static pj_status_t init_openssl(void) /* Shutdown OpenSSL */ static void shutdown_openssl(void) { - if (--openssl_init_count != 0) - return; + PJ_UNUSED_ARG(openssl_init_count); } |