Module: kamailio
Branch: master
Commit: 398e647b0667f5609d30ccb9f4cedbb659dca3ab
URL: 
https://github.com/kamailio/kamailio/commit/398e647b0667f5609d30ccb9f4cedbb659dca3ab

Author: S-P Chan <shihping.c...@gmail.com>
Committer: S-P Chan <shihping.c...@gmail.com>
Date: 2024-12-20T16:27:07+08:00

tls: revert tls_threads_mode=1

---

Modified: src/modules/tls/tls_mod.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/398e647b0667f5609d30ccb9f4cedbb659dca3ab.diff
Patch: 
https://github.com/kamailio/kamailio/commit/398e647b0667f5609d30ccb9f4cedbb659dca3ab.patch

---

diff --git a/src/modules/tls/tls_mod.c b/src/modules/tls/tls_mod.c
index 5a63beaf5ce..5d7c74f9249 100644
--- a/src/modules/tls/tls_mod.c
+++ b/src/modules/tls/tls_mod.c
@@ -45,9 +45,6 @@
 #include "../../core/counters.h"
 #include "../../core/tcp_info.h"
 
-#define KSR_RTHREAD_SKIP_P
-#define KSR_RTHREAD_NEED_4PP
-#include "../../core/rthreads.h"
 #include "tls_init.h"
 #include "tls_server.h"
 #include "tls_domain.h"
@@ -596,20 +593,8 @@ static int mod_child(int rank)
        if(tls_disable || (tls_domains_cfg == 0))
                return 0;
 
-       /*
-        * OpenSSL 3.x/1.1.1: create shared SSL_CTX* in thread executor
-        * to avoid init of libssl in thread#1:
-        *   - ksr_tls_threads_mode = 1 (KSR_TLS_THREADS_MTEMP)
-        */
        if(rank == PROC_INIT) {
-               return run_thread4PP((_thread_proto4PP)mod_child_hook, &rank, 
NULL);
-       }
-
-       if(ksr_tls_threads_mode == KSR_TLS_THREADS_MTEMP && rank
-                       && rank != PROC_INIT && rank != PROC_POSTCHILDINIT) {
-               for(k = 0; k < tls_pthreads_key_mark; k++)
-                       pthread_setspecific(k, 0x0);
-               LM_WARN("clean-up of thread-locals key < %d\n", 
tls_pthreads_key_mark);
+               return mod_child_hook(&rank, NULL);
        }
 
 #ifdef KSR_SSL_COMMON

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to