Browse code

acc: fixed computation of extra accounting fields

- introduced in previous commit
- reported by and credits for troubleshooting to Anthony Messina

(cherry picked from commit 0cf6fdc78d2171dba8d31370b84da99d8c94fb29)

Daniel-Constantin Mierla authored on 07/12/2014 19:26:37
Showing 1 changed files
... ...
@@ -229,7 +229,7 @@ int acc_log_request( struct sip_msg *rq)
229 229
 	char *p;
230 230
 	int n;
231 231
 	int m;
232
-	int o = 0;
232
+	int o;
233 233
 	int i;
234 234
 	struct tm *t;
235 235
 
... ...
@@ -237,7 +237,7 @@ int acc_log_request( struct sip_msg *rq)
237 237
 	m = core2strar( rq, val_arr, int_arr, type_arr);
238 238
 
239 239
 	/* get extra values */
240
-	o += extra2strar( log_extra, rq, val_arr+m, int_arr+m, type_arr+m);
240
+	o = extra2strar( log_extra, rq, val_arr+m, int_arr+m, type_arr+m);
241 241
 	m += o;
242 242
 
243 243
 	for ( i=0,p=log_msg ; i<m ; i++ ) {
... ...
@@ -476,7 +476,7 @@ int acc_db_request( struct sip_msg *rq)
476 476
 	}
477 477
 
478 478
 	/* extra columns */
479
-	o += extra2strar( db_extra, rq, val_arr+m, int_arr+m, type_arr+m);
479
+	o = extra2strar( db_extra, rq, val_arr+m, int_arr+m, type_arr+m);
480 480
 	m += o;
481 481
 
482 482
 	for( i++ ; i<m; i++)