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

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-07-08T11:12:37+02:00

tls: warning logs for connection close/clean not done by tcp main process

---

Modified: src/modules/tls/tls_server.c

---

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

---

diff --git a/src/modules/tls/tls_server.c b/src/modules/tls/tls_server.c
index 535e9351c65..5064d694b9b 100644
--- a/src/modules/tls/tls_server.c
+++ b/src/modules/tls/tls_server.c
@@ -681,9 +681,13 @@ int tls_h_tcpconn_init_f(struct tcp_connection *c, int 
sock)
 void tls_h_tcpconn_clean_f(struct tcp_connection *c)
 {
        struct tls_extra_data *extra;
+
        /*
        * runs within global tcp lock
        */
+       if(!is_tcp_main()) {
+               LM_WARN("not in tcp main process\n");
+       }
        if((c->type != PROTO_TLS) && (c->type != PROTO_WSS)) {
                BUG("Bad connection structure\n");
                abort();
@@ -719,6 +723,9 @@ void tls_h_tcpconn_close_f(struct tcp_connection *c, int fd)
         * tcpconn_put_destroy()+tcpconn_close_main_fd() the connection might
         * still be in a writer, so in this case locking is needed.
         */
+       if(!is_tcp_main()) {
+               LM_WARN("not in tcp main process\n");
+       }
        DBG("Closing SSL connection %p\n", c->extra_data);
        if(unlikely(cfg_get(tls, tls_cfg, send_close_notify) && c->extra_data)) 
{
                lock_get(&c->write_lock);

_______________________________________________
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