From 9b0ed6d54e47880818f934a8988c89d340739564 Mon Sep 17 00:00:00 2001 From: mikomarrache Date: Wed, 11 Feb 2015 11:37:26 +0100 Subject: [PATCH] dialog: fix initialization of slot next_id to avoid colision after restart - 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 e122c5ee8c6055c033cc11f14e5308ed94461fe6) --- modules/dialog/dlg_db_handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/dialog/dlg_db_handler.c b/modules/dialog/dlg_db_handler.c index a00f5ec802a..5655b99ddb1 100644 --- a/modules/dialog/dlg_db_handler.c +++ b/modules/dialog/dlg_db_handler.c @@ -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);