Skip to content

Commit

Permalink
Merge pull request #3063 from jes/master
Browse files Browse the repository at this point in the history
Fix 'NO_SSL_GLOBAL_LOCK' typos

(cherry picked from commit 895a534)
  • Loading branch information
rvlad-patrascu committed Apr 26, 2023
1 parent 3acb01c commit cdf252f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/tls_openssl/openssl_conn_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ static int openssl_tls_conn_shutdown(struct tcp_connection *c)
LM_DBG("shutdown successful\n");
return 0;
} else if (ret == 0) {
#ifndef NO_SSL_GLOBAL_LO
#ifndef NO_SSL_GLOBAL_LOCK
lock_release(tls_global_lock);
#endif
LM_DBG("first phase of 2-way handshake completed succesfuly\n");
Expand Down Expand Up @@ -679,7 +679,7 @@ int openssl_tls_async_connect(struct tcp_connection *con, int fd,

n = SSL_connect(ssl);
if (n > 0) {
#ifndef NO_SSL_GLOBAL_LOC
#ifndef NO_SSL_GLOBAL_LOCK
lock_release(tls_global_lock);
#endif

Expand All @@ -693,7 +693,7 @@ int openssl_tls_async_connect(struct tcp_connection *con, int fd,
return 1;
} else if (n == 0) {
err = SSL_get_error(ssl, n);
#ifndef NO_SSL_GLOBAL_LOC
#ifndef NO_SSL_GLOBAL_LOCK
lock_release(tls_global_lock);
#endif

Expand Down Expand Up @@ -833,7 +833,7 @@ int openssl_tls_write(struct tcp_connection *c, int fd, const void *buf,

ret = SSL_write(ssl, buf, len);
if (ret > 0) {
#ifndef NO_SSL_GLOBAL_LOC
#ifndef NO_SSL_GLOBAL_LOCK
lock_release(tls_global_lock);
#endif

Expand Down Expand Up @@ -1033,22 +1033,22 @@ static int openssl_read(struct tcp_connection *c, void *buf, size_t len)

ssl = c->extra_data;

#ifndef NO_SSL_GLOBAL_LO
#ifndef NO_SSL_GLOBAL_LOCK
lock_get(tls_global_lock);
#endif

ERR_clear_error();

ret = SSL_read(ssl, buf, len);
if (ret > 0) {
#ifndef NO_SSL_GLOBAL_LOC
#ifndef NO_SSL_GLOBAL_LOCK
lock_release(tls_global_lock);
#endif

LM_DBG("%d bytes read\n", ret);
return ret;
} else if (ret == 0) {
#ifndef NO_SSL_GLOBAL_LOC
#ifndef NO_SSL_GLOBAL_LOCK
lock_release(tls_global_lock);
#endif

Expand Down

0 comments on commit cdf252f

Please sign in to comment.