[sr-dev] git:master:7d2e763b: acc_radius : fixed representation

Yasin CANER yasin.caner at netgsm.com.tr
Mon Oct 26 21:38:57 CET 2015


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

Author: Yasin CANER <yasin.caner at netgsm.com.tr>
Committer: Yasin CANER <yasin.caner at netgsm.com.tr>
Date: 2015-10-26T15:49:24+02:00

acc_radius : fixed representation

fixed exponential representation in converting

---

Modified: modules/acc_radius/acc_radius_mod.c

---

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

---

diff --git a/modules/acc_radius/acc_radius_mod.c b/modules/acc_radius/acc_radius_mod.c
index e3be7df..3820339 100644
--- a/modules/acc_radius/acc_radius_mod.c
+++ b/modules/acc_radius/acc_radius_mod.c
@@ -356,7 +356,7 @@ int acc_radius_send_request(struct sip_msg *req, acc_info_t *inf)
                 gettimeofday(&inf->env->tv, NULL);
                 tsecmicro=inf->env->tv.tv_sec+((double)inf->env->tv.tv_usec/1000000.0);
                 //radius client doesn t support double so convert it
-                sprintf(smicrosec,"%f",tsecmicro);
+                sprintf(smicrosec,"%17.6f",tsecmicro);
                 ADD_RAD_AVPAIR(RA_TIME_STAMP, &smicrosec, -1);
         }else{
                 av_type = (uint32_t)inf->env->ts;




More information about the sr-dev mailing list