Skip to content

Commit

Permalink
dialog: fix initialization of slot next_id to avoid colision after re…
Browse files Browse the repository at this point in the history
…start

- next_id was set to the highest id of a dialog loaded from database,
  next new dialog was reusing the same value

(cherry picked from commit e122c5e)
  • Loading branch information
mikomarrache authored and miconda committed Feb 12, 2015
1 parent d76f8e3 commit 9b0ed6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/dialog/dlg_db_handler.c
Expand Up @@ -366,7 +366,7 @@ static int load_dialog_info_from_db(int dlg_hash_size, int fetch_num_rows)
next_id = d_table->entries[dlg->h_entry].next_id;

d_table->entries[dlg->h_entry].next_id =
(next_id < dlg->h_id) ? (dlg->h_id+1) : next_id;
(next_id <= dlg->h_id) ? (dlg->h_id+1) : next_id;

GET_STR_VALUE(to_tag, values, 6, 1, 1);

Expand Down

0 comments on commit 9b0ed6d

Please sign in to comment.