[sr-dev] git:master:eec965c1: ims_registrar_scscf: use TIME_T_FMT

Daniel-Constantin Mierla miconda at gmail.com
Wed Nov 3 13:03:44 CET 2021


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

Author: Sebastian Kemper <sebastian_ml at gmx.net>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-11-03T13:03:34+01:00

ims_registrar_scscf: use TIME_T_FMT

Signed-off-by: Sebastian Kemper <sebastian_ml at gmx.net>

---

Modified: src/modules/ims_registrar_scscf/registrar_notify.c
Modified: src/modules/ims_registrar_scscf/save.c

---

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

---

diff --git a/src/modules/ims_registrar_scscf/registrar_notify.c b/src/modules/ims_registrar_scscf/registrar_notify.c
index b2da75af19..761b014624 100644
--- a/src/modules/ims_registrar_scscf/registrar_notify.c
+++ b/src/modules/ims_registrar_scscf/registrar_notify.c
@@ -54,6 +54,7 @@
 #include "../../core/parser/parse_from.h"
 #include "../../core/parser/parse_content.h"
 #include "../../core/parser/parse_uri.h"
+#include "../../core/dprint.h" /* TIME_T_FMT */
 #include <libxml/parser.h>
 
 #include "../../lib/ims/useful_defs.h"
@@ -1517,8 +1518,8 @@ void create_notifications(udomain_t* _t, impurecord_t* r_passed, ucontact_t* c_p
             subscription_state.len = 0;
             if (subscription_state.s) {
 
-                sprintf(subscription_state.s, "%.*s%ld", subs_active.len,
-                        subs_active.s, s->expires - act_time);
+                sprintf(subscription_state.s, "%.*s%" TIME_T_FMT, subs_active.len,
+                        subs_active.s, TIME_T_CAST(s->expires - act_time));
                 subscription_state.len = strlen(subscription_state.s);
             }
 
diff --git a/src/modules/ims_registrar_scscf/save.c b/src/modules/ims_registrar_scscf/save.c
index e625cb25e3..6c8127d289 100644
--- a/src/modules/ims_registrar_scscf/save.c
+++ b/src/modules/ims_registrar_scscf/save.c
@@ -547,7 +547,7 @@ static inline int update_contacts_helper(struct sip_msg* msg, impurecord_t* impu
                         LM_DBG("Need to update contact: <%.*s>: "
                                 "q_value [%d],"
                                 "sos: [%d],"
-                                "expires [%ld]\n", chi->uri.len, chi->uri.s, qvalue, sos, expires - time(NULL));
+                                "expires [%" TIME_T_FMT "]\n", chi->uri.len, chi->uri.s, qvalue, sos, TIME_T_CAST(expires - time(NULL)));
 
                         LM_DBG("packing contact information\n");
                         if ((ci = pack_ci(msg, chi, expires, 0)) == 0) {




More information about the sr-dev mailing list