Skip to content

Commit

Permalink
dialog: use correct dialog for sync (fix CID #40673)
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Jul 10, 2020
1 parent ec67fe3 commit 22df0da
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/dialog/dlg_db_handler.c
Expand Up @@ -2084,15 +2084,15 @@ static int sync_dlg_db_mem(void)

/* skip flags - keep what we have - anyway can't tell which is new */

dlg->locked_by = process_no;
known_dlg->locked_by = process_no;

/* profiles - do not insert into a profile
* is dlg is already in that profile*/
if (!VAL_NULL(values+18))
read_dialog_profiles( VAL_STR(values+18).s,
strlen(VAL_STR(values+18).s), known_dlg, 1, 0);

dlg->locked_by = 0;
known_dlg->locked_by = 0;
dlg_unlock( d_table, d_entry);
} else {
/* DB has newer state, just update fields from DB */
Expand Down Expand Up @@ -2158,9 +2158,9 @@ static int sync_dlg_db_mem(void)
known_dlg->flags |= DLG_FLAG_NEW;

/* update the routes too */
GET_ROUTE_VALUE( dlg->rt_on_answer, values, 26);
GET_ROUTE_VALUE( dlg->rt_on_timeout, values, 27);
GET_ROUTE_VALUE( dlg->rt_on_hangup, values, 28);
GET_ROUTE_VALUE( known_dlg->rt_on_answer, values, 26);
GET_ROUTE_VALUE( known_dlg->rt_on_timeout, values, 27);
GET_ROUTE_VALUE( known_dlg->rt_on_hangup, values, 28);

/* update script variables
* if already found, delete the old one
Expand All @@ -2174,15 +2174,15 @@ static int sync_dlg_db_mem(void)
}
}

dlg->locked_by = process_no;
known_dlg->locked_by = process_no;

/* profiles - do not insert into a profile
* is dlg is already in that profile*/
if (!VAL_NULL(values+18))
read_dialog_profiles( VAL_STR(values+18).s,
strlen(VAL_STR(values+18).s), known_dlg, 1, 0);

dlg->locked_by = 0;
known_dlg->locked_by = 0;
dlg_unlock( d_table, d_entry);
}
}
Expand Down

0 comments on commit 22df0da

Please sign in to comment.