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

Author: Viktor <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2022-01-07T12:23:41+01:00

tcpclose event_routes issue

---

Modified: src/core/tcp_main.c

---

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

---

diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c
index 458093b22d..f738325285 100644
--- a/src/core/tcp_main.c
+++ b/src/core/tcp_main.c
@@ -3649,7 +3649,7 @@ inline static int handle_tcp_child(struct tcp_child* 
tcp_c, int fd_i)
                                /* if refcnt was 1 => it was used only in the
                                   tcp reader => it's not hashed or watched for 
IO
                                   anymore => no need to io_watch_del() */
-                               tcp_emit_closed_event(c, TCP_CLOSED_EOF);
+                               tcp_emit_closed_event(tcpconn, TCP_CLOSED_EOF);
                                tcpconn_destroy(tcpconn);
                                break;
                        }
@@ -3661,7 +3661,7 @@ inline static int handle_tcp_child(struct tcp_child* 
tcp_c, int fd_i)
                                                tcpconn->flags &= 
~F_CONN_WRITE_W;
                                        }
 #endif /* TCP_ASYNC */
-                                       tcp_emit_closed_event(c, 
TCP_CLOSED_EOF);
+                                       tcp_emit_closed_event(tcpconn, 
TCP_CLOSED_EOF);
                                        tcpconn_put_destroy(tcpconn);
                                }
 #ifdef TCP_ASYNC
@@ -3713,7 +3713,7 @@ inline static int handle_tcp_child(struct tcp_child* 
tcp_c, int fd_i)
                                                        io_watch_del(&io_h, 
tcpconn->s, -1, IO_FD_CLOSING);
                                                        
tcpconn->flags&=~F_CONN_WRITE_W;
                                                }
-                                               tcp_emit_closed_event(c, 
TCP_CLOSED_EOF);
+                                               tcp_emit_closed_event(tcpconn, 
TCP_CLOSED_EOF);
                                                tcpconn_put_destroy(tcpconn);
                                        } else if (unlikely(tcpconn->flags & 
F_CONN_WRITE_W)){
                                                BUG("unhashed connection 
watched for write\n");
@@ -3750,7 +3750,7 @@ inline static int handle_tcp_child(struct tcp_child* 
tcp_c, int fd_i)
                                                tcpconn->flags&=~F_CONN_WRITE_W;
                                        }
 #endif /* TCP_ASYNC */
-                                       tcp_emit_closed_event(c, 
TCP_CLOSED_EOF);
+                                       tcp_emit_closed_event(tcpconn, 
TCP_CLOSED_EOF);
                                        tcpconn_put_destroy(tcpconn);
                                }
 #ifdef TCP_ASYNC
@@ -3782,7 +3782,7 @@ inline static int handle_tcp_child(struct tcp_child* 
tcp_c, int fd_i)
 #endif /* TCP_ASYNC */
                                if (tcpconn_try_unhash(tcpconn))
                                        tcpconn_put(tcpconn);
-                               tcp_emit_closed_event(c, TCP_CLOSED_EOF);
+                               tcp_emit_closed_event(tcpconn, TCP_CLOSED_EOF);
                                tcpconn_put_destroy(tcpconn); /* deref & delete 
if refcnt==0 */
                                break;
                default:


_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to