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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2026-05-16T09:48:51+02:00

tcpops: proper check for tcp connection get result

---

Modified: src/modules/tcpops/tcpops_mod.c

---

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

---

diff --git a/src/modules/tcpops/tcpops_mod.c b/src/modules/tcpops/tcpops_mod.c
index cf7abf5f54f..ed074906dc4 100644
--- a/src/modules/tcpops/tcpops_mod.c
+++ b/src/modules/tcpops/tcpops_mod.c
@@ -600,7 +600,7 @@ static int ki_tcp_get_conid_helper(sip_msg_t *msg, str 
*saddr, pv_spec_t *pvs)
        port = su_getport(&dst.to);
        c = tcpconn_get(dst.id, &ip, port, NULL, clifetime);
 
-       if(unlikely(c <= 0)) {
+       if(unlikely(c == NULL)) {
                goto setvalue;
        }
        conid = c->id;

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to