Module: kamailio
Branch: master
Commit: fc8bee5b87e95e43bda2635e65457b2025eab6f9
URL:
https://github.com/kamailio/kamailio/commit/fc8bee5b87e95e43bda2635e65457b2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-07-12T12:05:40+02:00
pua: use long for time value diff operation
---
Modified: src/modules/pua/pua.c
---
Diff:
https://github.com/kamailio/kamailio/commit/fc8bee5b87e95e43bda2635e65457b2…
Patch:
https://github.com/kamailio/kamailio/commit/fc8bee5b87e95e43bda2635e65457b2…
---
diff --git a/src/modules/pua/pua.c b/src/modules/pua/pua.c
index e57183427f3..a53bfd83963 100644
--- a/src/modules/pua/pua.c
+++ b/src/modules/pua/pua.c
@@ -1121,9 +1121,10 @@ static ua_pres_t *build_uppubl_cbparam(ua_pres_t *p)
publ.pres_uri = p->pres_uri;
publ.content_type = p->content_type;
publ.id = p->id;
- publ.expires = (p->desired_expires == 0)
- ? -1
- : p->desired_expires - (int)time(NULL);
+ publ.expires =
+ (int)((p->desired_expires == 0)
+ ? -1
+ : ((long)p->desired_expires - (long)time(NULL)));
publ.flag = UPDATE_TYPE;
publ.source_flag = p->flag;
publ.event = p->event;