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

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2024-07-29T09:44:47+02:00

core: tcp - use long long constants for operations

---

Modified: src/core/tcp_read.c

---

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

---

diff --git a/src/core/tcp_read.c b/src/core/tcp_read.c
index 8fa6566c14b..fd60918fe34 100644
--- a/src/core/tcp_read.c
+++ b/src/core/tcp_read.c
@@ -449,9 +449,9 @@ int tcp_read_headers(struct tcp_connection *c, 
rd_conn_flags_t *read_flags)
                if(bytes <= 0)
                        return bytes;
                gettimeofday(&tvnow, NULL);
-               tvdiff = 1000000 * (tvnow.tv_sec - r->tvrstart.tv_sec)
+               tvdiff = 1000000LL * (tvnow.tv_sec - r->tvrstart.tv_sec)
                                 + (tvnow.tv_usec - r->tvrstart.tv_usec);
-               if(tvdiff >= ksr_tcp_msg_read_timeout * 1000000) {
+               if(tvdiff >= 1000000LL * ksr_tcp_msg_read_timeout) {
                        LM_ERR("message reading timeout after %lld usec\n", 
tvdiff);
                        r->parsed = r->buf;
                        r->content_len = 0;

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to