Module: kamailio
Branch: master
Commit: 2f7da809d53ffadff017681e257b8d86bec3a5ce
URL:
https://github.com/kamailio/kamailio/commit/2f7da809d53ffadff017681e257b8d8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-02-16T12:16:26+01:00
statsc: cast to uint64_t when using time_t value
---
Modified: src/modules/statsc/statsc_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2f7da809d53ffadff017681e257b8d8…
Patch:
https://github.com/kamailio/kamailio/commit/2f7da809d53ffadff017681e257b8d8…
---
diff --git a/src/modules/statsc/statsc_mod.c b/src/modules/statsc/statsc_mod.c
index 69cd335b66..3b636b81fc 100644
--- a/src/modules/statsc/statsc_mod.c
+++ b/src/modules/statsc/statsc_mod.c
@@ -24,6 +24,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#include <time.h>
#include "../../core/sr_module.h"
@@ -409,8 +410,8 @@ static void statsc_rpc_report(rpc_t* rpc, void* ctx)
return;
}
if(rpc->struct_add(th, "u[",
- "timestamp", (unsigned int)tn,
- "stats", &ts )<0) {
+ "timestamp", (uint64_t)tn,
+ "stats", &ts)<0) {
rpc->fault(ctx, 500, "Error creating rpc (2)");
return;
}