Module: kamailio
Branch: 4.3
Commit: b7678a7c920f82ab23e495e76db99d7b2457395e
URL:
https://github.com/kamailio/kamailio/commit/b7678a7c920f82ab23e495e76db99d7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-10-06T00:35:07+02:00
acc: reset errno for converting numbers for cdr generation
- reported by Mayama Takeshi, GH#359
(cherry picked from commit caf477104c90049bf0c5e163d7eff89111448776)
---
Modified: modules/acc/acc_cdr.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b7678a7c920f82ab23e495e76db99d7…
Patch:
https://github.com/kamailio/kamailio/commit/b7678a7c920f82ab23e495e76db99d7…
---
diff --git a/modules/acc/acc_cdr.c b/modules/acc/acc_cdr.c
index d5b16e3..73bdd45 100644
--- a/modules/acc/acc_cdr.c
+++ b/modules/acc/acc_cdr.c
@@ -163,6 +163,8 @@ static int db_write_cdr( struct dlg_cell* dialog,
for(i=0; i<m; i++) {
db_cdr_keys[i] = &cdr_attrs[i];
+ /* reset errno, some strtoX don't reset it */
+ errno = 0;
switch(cdr_type_array[i]) {
case TYPE_NULL:
VAL_NULL(db_cdr_vals+i)=1;