Module: kamailio
Branch: master
Commit: 8794e509b951658e055cc06374c0e2561debdde3
URL:
https://github.com/kamailio/kamailio/commit/8794e509b951658e055cc06374c0e25…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-12-07T07:02:42+01:00
core: tcp - set type for literals usef for time difference
---
Modified: src/core/tcp_main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/8794e509b951658e055cc06374c0e25…
Patch:
https://github.com/kamailio/kamailio/commit/8794e509b951658e055cc06374c0e25…
---
diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c
index 3d4a6a4e0b1..4972b7d20af 100644
--- a/src/core/tcp_main.c
+++ b/src/core/tcp_main.c
@@ -5489,11 +5489,11 @@ void tcp_timer_check_connections(unsigned int ticks, void *param)
cidset = 0;
if(con->state == S_CONN_OK) {
if(con->req.tvrstart.tv_sec > 0) {
- tvdiff = 1000000
+ tvdiff = 1000000LL
* (tvnow.tv_sec
- con->req.tvrstart.tv_sec)
+ (tvnow.tv_usec - con->req.tvrstart.tv_usec);
- if(tvdiff >= ksr_tcp_msg_read_timeout * 1000000) {
+ if(tvdiff >= 1000000LL * ksr_tcp_msg_read_timeout) {
LM_DBG("n: %d - connection id: %d - message "
"reading timeout: %lld\n",
n, con->id, tvdiff);