Module: kamailio
Branch: master
Commit: 03647b03c0ede9e2d5f65766ce6b72c593e3f39c
URL:
https://github.com/kamailio/kamailio/commit/03647b03c0ede9e2d5f65766ce6b72c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-02-13T09:10:52+01:00
core: tcp - init value of *tcp_total_wq after allocation
- use %u to log unsigned variables
---
Modified: src/core/tcp_main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/03647b03c0ede9e2d5f65766ce6b72c…
Patch:
https://github.com/kamailio/kamailio/commit/03647b03c0ede9e2d5f65766ce6b72c…
---
diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c
index 4ebd6b7baf..e57a29d99e 100644
--- a/src/core/tcp_main.c
+++ b/src/core/tcp_main.c
@@ -613,8 +613,8 @@ inline static int _wbufq_add(struct tcp_connection* c, const char*
data,
((*tcp_total_wq+size)>cfg_get(tcp, tcp_cfg, tcp_wq_max)) ||
(q->first &&
TICKS_LT(q->wr_timeout, t)) )){
- LM_ERR("(%d bytes): write queue full or timeout "
- " (%d, total %d, last write %d s ago)\n",
+ LM_ERR("(%u bytes): write queue full or timeout "
+ " (%u, total %u, last write %d s ago)\n",
size, q->queued, *tcp_total_wq,
TICKS_TO_S(t-(q->wr_timeout-
cfg_get(tcp, tcp_cfg, send_timeout))));
@@ -4947,6 +4947,7 @@ int init_tcp()
SHM_MEM_CRITICAL;
goto error;
}
+ *tcp_total_wq=0;
#endif /* TCP_ASYNC */
/* alloc hashtables*/
tcpconn_aliases_hash=(struct tcp_conn_alias**)