Browse code

acc: reset errno for converting numbers for cdr generation

- reported by Mayama Takeshi, GH#359

Daniel-Constantin Mierla authored on 05/10/2015 22:28:19
Showing 1 changed files
... ...
@@ -163,6 +163,8 @@ static int db_write_cdr( struct dlg_cell* dialog,
163 163
 
164 164
 	for(i=0; i<m; i++) {
165 165
 		db_cdr_keys[i] = &cdr_attrs[i];
166
+		/* reset errno, some strtoX don't reset it */
167
+		errno = 0;
166 168
 		switch(cdr_type_array[i]) {
167 169
 			case TYPE_NULL:
168 170
 				VAL_NULL(db_cdr_vals+i)=1;