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

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-07-11T17:59:12+02:00

tcp: mtops - updated conditions checking proc list

---

Modified: src/core/tcp_mtops.c

---

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

---

diff --git a/src/core/tcp_mtops.c b/src/core/tcp_mtops.c
index 69a88e5b04b..e21b9667afa 100644
--- a/src/core/tcp_mtops.c
+++ b/src/core/tcp_mtops.c
@@ -247,7 +247,7 @@ unsigned char *ksr_tcpx_thread_wrbuf(int pidx)
  */
 int ksr_tcpx_proc_list_rank(int rank)
 {
-       if(_ksr_tcpx_proc_list != NULL)
+       if(_ksr_tcpx_proc_list == NULL)
                return -1;
        if(process_no >= _ksr_tcpx_proc_list_size)
                return -1;
@@ -263,11 +263,11 @@ int ksr_tcpx_proc_list_rank(int rank)
  */
 int ksr_tcpx_proc_list_destroy(void)
 {
-       if(_ksr_tcpx_proc_list != NULL)
+       if(_ksr_tcpx_proc_list == NULL)
                return -1;
 
        shm_free(_ksr_tcpx_proc_list);
-       _ksr_tcpx_proc_list = 0;
+       _ksr_tcpx_proc_list = NULL;
        _ksr_tcpx_proc_list_size = 0;
        return 0;
 }

_______________________________________________
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