Skip to content

Commit

Permalink
acc: make sure we we don't write the same record twice
Browse files Browse the repository at this point in the history
this scenario appears when using multi bye leg support and there are no legs

(cherry picked from commit 48050ee)
  • Loading branch information
razvancrainea committed Apr 16, 2014
1 parent be4c0ca commit 9ef8684
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/acc/acc.c
Expand Up @@ -679,7 +679,7 @@ int acc_db_cdrs(struct dlg_cell *dlg, struct sip_msg *msg)
nr_bye_vals = legs2strar(leg_bye_info,msg,val_arr+ret+nr_vals, 0);
}
/* there were no Invite legs */
while (nr_bye_vals) {
while (!nr_legs && nr_bye_vals) {
/* drain all the values */
for (j = ret+nr_vals; j<ret+nr_bye_vals+nr_vals; j++)
VAL_STR(db_vals+j+1) = val_arr[j];
Expand Down

0 comments on commit 9ef8684

Please sign in to comment.