Module: kamailio
Branch: master
Commit: 20561b66364f2321c604d0655c3029decdd2dff6
URL:
https://github.com/kamailio/kamailio/commit/20561b66364f2321c604d0655c3029d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-05-04T14:22:06+02:00
db_flatstore: use unsigned long long for printing time_t value
---
Modified: src/modules/db_flatstore/flat_cmd.c
Modified: src/modules/db_flatstore/km_flatstore.c
---
Diff:
https://github.com/kamailio/kamailio/commit/20561b66364f2321c604d0655c3029d…
Patch:
https://github.com/kamailio/kamailio/commit/20561b66364f2321c604d0655c3029d…
---
diff --git a/src/modules/db_flatstore/flat_cmd.c b/src/modules/db_flatstore/flat_cmd.c
index fbbb57a0c4..3b0ecb0191 100644
--- a/src/modules/db_flatstore/flat_cmd.c
+++ b/src/modules/db_flatstore/flat_cmd.c
@@ -142,7 +142,7 @@ int flat_put(db_res_t* res, db_cmd_t* cmd)
break;
case DB_DATETIME:
- if (fprintf(f, "%u", (unsigned int)cmd->vals[i].v.time) < 0)
+ if (fprintf(f, "%llu", (unsigned long long)cmd->vals[i].v.time) < 0)
goto error;
break;
diff --git a/src/modules/db_flatstore/km_flatstore.c
b/src/modules/db_flatstore/km_flatstore.c
index 007d1b8338..b933479ad0 100644
--- a/src/modules/db_flatstore/km_flatstore.c
+++ b/src/modules/db_flatstore/km_flatstore.c
@@ -207,7 +207,7 @@ int flat_db_insert(const db1_con_t* h, const db_key_t* k, const
db_val_t* v,
break;
case DB1_DATETIME:
- fprintf(f, "%u", (unsigned int)VAL_TIME(v + i));
+ fprintf(f, "%llu", (unsigned long long)VAL_TIME(v + i));
break;
case DB1_BLOB: