Module: sip-router
Branch: master
Commit: a4545d8d23d9de3c6cf18329a822b677d9527047
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a4545d8…
Author: Alex Hermann <alex(a)speakup.nl>
Committer: Alex Hermann <alex(a)speakup.nl>
Date: Tue Dec 28 13:44:53 2010 +0100
modules_k/pv: Fix microsecond respresentation of $TV(Sn)
Make sure <100000us isn't off by multiple powers of 10.
eg make sure 5us isn't printed as 0.5 sec by padding with 0's
---
modules_k/pv/pv_time.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules_k/pv/pv_time.c b/modules_k/pv/pv_time.c
index 0687f53..72ce234 100644
--- a/modules_k/pv/pv_time.c
+++ b/modules_k/pv/pv_time.c
@@ -300,7 +300,7 @@ int pv_get_timeval(struct sip_msg *msg, pv_param_t *param,
LM_ERR("unable to get time val attributes\n");
return pv_get_null(msg, param, res);
}
- s.len = snprintf(_timeval_ts_buf, 32, "%u.%u",
+ s.len = snprintf(_timeval_ts_buf, 32, "%u.%06u",
(unsigned int)tv.tv_sec, (unsigned int)tv.tv_usec);
if(s.len<0)
return pv_get_null(msg, param, res);