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

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-05-04T21:03:27+02:00

presence: use internal wraper for signed int time

---

Modified: src/modules/presence/hash.c

---

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

---

diff --git a/src/modules/presence/hash.c b/src/modules/presence/hash.c
index 39878ac08d9..1d998ca4294 100644
--- a/src/modules/presence/hash.c
+++ b/src/modules/presence/hash.c
@@ -309,7 +309,7 @@ int insert_shtable(shtable_t htable, unsigned int 
hash_code, subs_t *subs)
                LM_ERR("copying in share memory a subs_t structure\n");
                return -1;
        }
-       new_rec->expires += (int)time(NULL);
+       new_rec->expires += ksr_time_sint(NULL, NULL);
 
        lock_get(&htable[hash_code].lock);
        new_rec->next = htable[hash_code].entries->next;
@@ -417,7 +417,7 @@ int update_shtable(
        }
 
        if(type & REMOTE_TYPE) {
-               s->expires = subs->expires + (int)time(NULL);
+               s->expires = subs->expires + ksr_time_sint(NULL, NULL);
                s->remote_cseq = subs->remote_cseq;
        } else {
                subs->local_cseq = ++s->local_cseq;

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to