[Asterisk-code-review] bridge roles: Use a non-locking linked list where appropriate (asterisk[15])
Jenkins2
asteriskteam at digium.com
Fri Feb 16 17:50:17 CST 2018
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/8217 )
Change subject: bridge_roles: Use a non-locking linked list where appropriate
......................................................................
bridge_roles: Use a non-locking linked list where appropriate
Also explicitly initialize with the AST_LIST_HEAD_NOLOCK_INIT macro for
clarity.
Change-Id: I4bc39ec33bc3ff77e1a971a01ace87deb965be3f
---
M main/bridge_roles.c
1 file changed, 6 insertions(+), 2 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Corey Farrell: Looks good to me, but someone else must approve
Richard Mudgett: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/main/bridge_roles.c b/main/bridge_roles.c
index a9b95a3..6dbae6f 100644
--- a/main/bridge_roles.c
+++ b/main/bridge_roles.c
@@ -51,12 +51,12 @@
struct bridge_role {
AST_LIST_ENTRY(bridge_role) list;
- AST_LIST_HEAD(, bridge_role_option) options;
+ AST_LIST_HEAD_NOLOCK(, bridge_role_option) options;
char role[AST_ROLE_LEN];
};
struct bridge_roles_datastore {
- AST_LIST_HEAD(, bridge_role) role_list;
+ AST_LIST_HEAD_NOLOCK(, bridge_role) role_list;
};
/*!
@@ -127,6 +127,8 @@
ast_datastore_free(datastore);
return NULL;
}
+
+ AST_LIST_HEAD_INIT_NOLOCK(&roles_datastore->role_list);
datastore->data = roles_datastore;
ast_channel_datastore_add(chan, datastore);
@@ -264,6 +266,8 @@
return -1;
}
+ AST_LIST_HEAD_INIT_NOLOCK(&role->options);
+
ast_copy_string(role->role, role_name, sizeof(role->role));
AST_LIST_INSERT_TAIL(&roles_datastore->role_list, role, list);
--
To view, visit https://gerrit.asterisk.org/8217
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I4bc39ec33bc3ff77e1a971a01ace87deb965be3f
Gerrit-Change-Number: 8217
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180216/f4d6503a/attachment.html>
More information about the asterisk-code-review
mailing list