mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
config: Fix locking for extconfig reload.
Expand locking to include full reload process for extconfig to ensure nothing can read the config mappings between clearing and reloading. Change-Id: I378316bad04f1b599ea82d0fef62b8978a644b92
This commit is contained in:
@@ -2839,8 +2839,6 @@ static void clear_config_maps(void)
|
||||
{
|
||||
struct ast_config_map *map;
|
||||
|
||||
SCOPED_MUTEX(lock, &config_lock);
|
||||
|
||||
while (config_maps) {
|
||||
map = config_maps;
|
||||
config_maps = config_maps->next;
|
||||
@@ -2894,6 +2892,7 @@ int read_config_maps(void)
|
||||
char *driver, *table, *database, *textpri, *stringp, *tmp;
|
||||
struct ast_flags flags = { CONFIG_FLAG_NOREALTIME };
|
||||
int pri;
|
||||
SCOPED_MUTEX(lock, &config_lock);
|
||||
|
||||
clear_config_maps();
|
||||
|
||||
|
Reference in New Issue
Block a user