Module: kamailio
Branch: master
Commit: 8b74c67de4aef45835a34efc55e0db66f8a9d2ed
URL:
https://github.com/kamailio/kamailio/commit/8b74c67de4aef45835a34efc55e0db6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-09-18T14:12:38+02:00
Revert "Revert "tls: proper ifdef on libssl version for
tls_init_locks()""
This reverts commit da5d71da620deb8b8740256e556011e93cdac1a3.
---
Modified: src/modules/tls/tls_locking.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8b74c67de4aef45835a34efc55e0db6…
Patch:
https://github.com/kamailio/kamailio/commit/8b74c67de4aef45835a34efc55e0db6…
---
diff --git a/src/modules/tls/tls_locking.c b/src/modules/tls/tls_locking.c
index 3eb6f033a5..21078e82d9 100644
--- a/src/modules/tls/tls_locking.c
+++ b/src/modules/tls/tls_locking.c
@@ -140,7 +140,7 @@ unsigned long sr_ssl_id_f()
/* returns -1 on error, 0 on success */
int tls_init_locks()
{
-/* OpenSSL is thread-safe since 1.1.0 */
+/* OpenSSL is no longer supporting to set locking callbacks since 1.1.0 */
#if OPENSSL_VERSION_NUMBER < 0x10100000L
/* init "static" tls locks */
n_static_locks=CRYPTO_num_locks();
@@ -185,10 +185,13 @@ int tls_init_locks()
* (only atomic_inc), fallback to the default use-locks mode
* CRYPTO_set_add_lock_callback(atomic_add_f);
*/
-#endif
return 0;
error:
tls_destroy_locks();
return -1;
+
+#else
+ return 0;
+#endif
}