[sr-dev] git:master:caf47710: acc: reset errno for converting numbers for cdr generation
Daniel-Constantin Mierla
miconda at gmail.com
Tue Oct 6 00:29:56 CEST 2015
Module: kamailio
Branch: master
Commit: caf477104c90049bf0c5e163d7eff89111448776
URL: https://github.com/kamailio/kamailio/commit/caf477104c90049bf0c5e163d7eff89111448776
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-10-06T00:29:38+02:00
acc: reset errno for converting numbers for cdr generation
- reported by Mayama Takeshi, GH#359
---
Modified: modules/acc/acc_cdr.c
---
Diff: https://github.com/kamailio/kamailio/commit/caf477104c90049bf0c5e163d7eff89111448776.diff
Patch: https://github.com/kamailio/kamailio/commit/caf477104c90049bf0c5e163d7eff89111448776.patch
---
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;
More information about the sr-dev
mailing list