mirror of https://github.com/sipwise/kamailio.git
acc module values were rounded when convert double to str on the query Change-Id: I2c1c7c3ac68cdb08455596424c414d306428027achanges/54/2054/1
parent
9376ec28ad
commit
8a1c6f86aa
@ -0,0 +1,26 @@
|
||||
From e1dcdf5a48cae9802c51c1d516d6fbc862855dcb Mon Sep 17 00:00:00 2001
|
||||
From: Victor Seva <linuxmaniac@torreviejawireless.org>
|
||||
Date: Mon, 8 Jun 2015 15:45:28 +0200
|
||||
Subject: [PATCH] lib/srdb1: use 6 digits for db_double2str
|
||||
|
||||
acc module was getting values rounded by this
|
||||
---
|
||||
lib/srdb1/db_ut.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/srdb1/db_ut.c b/lib/srdb1/db_ut.c
|
||||
index 6ed8c16..091c2e9 100644
|
||||
--- a/lib/srdb1/db_ut.c
|
||||
+++ b/lib/srdb1/db_ut.c
|
||||
@@ -193,7 +193,7 @@ inline int db_double2str(double _v, char* _s, int* _l)
|
||||
return -1;
|
||||
}
|
||||
|
||||
- ret = snprintf(_s, *_l, "%-10.2f", _v);
|
||||
+ ret = snprintf(_s, *_l, "%-10.6f", _v);
|
||||
if (ret < 0 || ret >= *_l) {
|
||||
LM_ERR("Error in snprintf\n");
|
||||
return -1;
|
||||
--
|
||||
2.1.4
|
||||
|
Loading…
Reference in new issue