[sr-dev] git:master:a7bcf5bc: xhttp_pi: use TIME_T_FMT

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


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

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

xhttp_pi: use TIME_T_FMT

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

---

Modified: src/modules/xhttp_pi/xhttp_pi_fnc.c

---

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

---

diff --git a/src/modules/xhttp_pi/xhttp_pi_fnc.c b/src/modules/xhttp_pi/xhttp_pi_fnc.c
index 5610e319bb..a11b3f40a2 100644
--- a/src/modules/xhttp_pi/xhttp_pi_fnc.c
+++ b/src/modules/xhttp_pi/xhttp_pi_fnc.c
@@ -3186,18 +3186,18 @@ int ph_run_pi_cmd(pi_ctx_t* ctx)
 						val_str.len = max_page_len - ctx->reply.body.len;
 						if(db_time2str(values[j].val.time_val,
 									val_str.s, &val_str.len)!=0){
-							LM_ERR("Unable to convert double [%ld]\n",
-								values[j].val.time_val);
+							LM_ERR("Unable to convert double [%" TIME_T_FMT "]\n",
+								TIME_T_CAST(values[j].val.time_val));
 							goto error;
 						}
 						p += val_str.len;
 						ctx->reply.body.len += val_str.len;
 						if(link_on) XHTTP_PI_COPY_2(p,XHTTP_PI_SQUOT_GT,val_str);
 						LM_DBG("   got %.*s[%d]=>"
-							"[%ld][%.*s]\n",
+							"[%" TIME_T_FMT "][%.*s]\n",
 							command->q_keys[j]->len,
 							command->q_keys[j]->s, i,
-							values[j].val.time_val,
+							TIME_T_CAST(values[j].val.time_val),
 							val_str.len, val_str.s);
 						break;
 					default:




More information about the sr-dev mailing list