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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2022-11-07T21:11:56+01:00

websocket: more details on debig messages

---

Modified: src/modules/websocket/ws_conn.c
Modified: src/modules/websocket/ws_frame.c

---

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

---

diff --git a/src/modules/websocket/ws_conn.c b/src/modules/websocket/ws_conn.c
index a56eb492388..1a4f8ffbb3c 100644
--- a/src/modules/websocket/ws_conn.c
+++ b/src/modules/websocket/ws_conn.c
@@ -464,7 +464,7 @@ ws_connection_t *wsconn_get(int id)
        for(wsc = wsconn_id_hash[id_hash]; wsc; wsc = wsc->id_next) {
                if(wsc->id == id) {
                        wsconn_ref(wsc);
-                       LM_DBG("wsconn_get returns wsc [%p] refcnt [%d]\n", wsc,
+                       LM_DBG("wsconn_get id [%d] returns wsc [%p] refcnt 
[%d]\n", id, wsc,
                                        atomic_get(&wsc->refcnt));
 
                        WSCONN_UNLOCK;
diff --git a/src/modules/websocket/ws_frame.c b/src/modules/websocket/ws_frame.c
index 2da0863de5f..583e9040522 100644
--- a/src/modules/websocket/ws_frame.c
+++ b/src/modules/websocket/ws_frame.c
@@ -811,7 +811,8 @@ void ws_keepalive(unsigned int ticks, void *param)
                        } else if (ws_keepalive_mechanism == 
KEEPALIVE_MECHANISM_CONCHECK) {
                                tcp_connection_t *con = tcpconn_get(wsc->id, 0, 
0, 0, 0);
                                if(con==NULL) {
-                                       LM_INFO("tcp connection has been 
lost\n");
+                                       LM_INFO("tcp connection has been lost 
(id: %d wsc: %p)\n",
+                                                       wsc->id, wsc);
                                        wsc->state = WS_S_CLOSING;
                                } else {
                                        tcpconn_put(con);


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

Reply via email to