Module: sip-router
Branch: master
Commit: ede2d6747aabf32538797dfedf13682c5c242831
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ede2d67…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Sep 3 13:35:08 2013 +0200
acc: cast to double for safer conversion in time_mode==2
---
modules/acc/acc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/acc/acc.c b/modules/acc/acc.c
index 7f08f17..272a70f 100644
--- a/modules/acc/acc.c
+++ b/modules/acc/acc.c
@@ -413,7 +413,7 @@ int acc_db_request( struct sip_msg *rq)
if(acc_time_mode==1) {
VAL_INT(db_vals+(m++)) = (int)acc_env.tv.tv_usec;
} else if(acc_time_mode==2) {
- VAL_DOUBLE(db_vals+(m++)) = ((acc_env.tv.tv_sec * 1000)
+ VAL_DOUBLE(db_vals+(m++)) = ((double)(acc_env.tv.tv_sec * 1000)
+ (acc_env.tv.tv_usec / 1000)) / 1000;
}