[Asterisk-code-review] config: Fix locking for extconfig reload. (asterisk[master])
Jenkins2
asteriskteam at digium.com
Tue Feb 20 06:14:08 CST 2018
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/8258 )
Change subject: config: Fix locking for extconfig reload.
......................................................................
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
---
M main/config.c
1 file changed, 1 insertion(+), 2 deletions(-)
Approvals:
George Joseph: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/main/config.c b/main/config.c
index 3fbbacf..118b958 100644
--- a/main/config.c
+++ b/main/config.c
@@ -2839,8 +2839,6 @@
{
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 @@
char *driver, *table, *database, *textpri, *stringp, *tmp;
struct ast_flags flags = { CONFIG_FLAG_NOREALTIME };
int pri;
+ SCOPED_MUTEX(lock, &config_lock);
clear_config_maps();
--
To view, visit https://gerrit.asterisk.org/8258
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I378316bad04f1b599ea82d0fef62b8978a644b92
Gerrit-Change-Number: 8258
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180220/b02fd301/attachment.html>
More information about the asterisk-code-review
mailing list