Module: kamailio
Branch: 5.0
Commit: d08c1256939a148d7fd6b3c71b2947f431c56178
URL: 
https://github.com/kamailio/kamailio/commit/d08c1256939a148d7fd6b3c71b2947f431c56178

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2017-08-31T15:50:09+02:00

core: tcp - print reason in tcp emit closed event debug message

(cherry picked from commit 83724225ebc3ed778e7bacb487e3d3376e47e504)

---

Modified: src/core/tcp_read.c

---

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

---

diff --git a/src/core/tcp_read.c b/src/core/tcp_read.c
index 824239e39e..b2a9e9fbe8 100644
--- a/src/core/tcp_read.c
+++ b/src/core/tcp_read.c
@@ -192,14 +192,14 @@ static int tcp_emit_closed_event(struct tcp_connection 
*con, enum tcp_closed_rea
        tcp_closed_event_info_t tev;
 
        ret = 0;
-       LM_DBG("TCP closed event creation triggered\n");
+       LM_DBG("TCP closed event creation triggered (reason: %d)\n", reason);
        if(likely(sr_event_enabled(SREV_TCP_CLOSED))) {
                memset(&tev, 0, sizeof(tcp_closed_event_info_t));
                tev.reason = reason;
                tev.con = con;
                ret = sr_event_exec(SREV_TCP_CLOSED, (void*)(&tev));
        } else {
-               LM_DBG("no callback registering for handling TCP closed event - 
dropping!\n");
+               LM_DBG("no callback registering for handling TCP closed 
event\n");
        }
        return ret;
 }


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

Reply via email to