diff options
author | Corey Farrell <git@cfware.com> | 2018-02-19 03:49:45 -0500 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2018-02-19 03:09:02 -0600 |
commit | e03f0f9572a4cdd53baa2b1667467fa74e972af0 (patch) | |
tree | 5f0700e4c1319fdb3772306244bac74e274d72fe /main | |
parent | ba75d536691ae560b0e07c05bfecee5878330b91 (diff) |
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
Diffstat (limited to 'main')
-rw-r--r-- | main/config.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/main/config.c b/main/config.c index 3fbbacf74..118b9586e 100644 --- a/main/config.c +++ b/main/config.c @@ -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(); |