<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8218">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bridge_roles: Use a non-locking linked list where appropriate<br><br>Also explicitly initialize with the AST_LIST_HEAD_NOLOCK_INIT macro for<br>clarity.<br><br>Change-Id: I4bc39ec33bc3ff77e1a971a01ace87deb965be3f<br>---<br>M main/bridge_roles.c<br>1 file changed, 6 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/18/8218/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/bridge_roles.c b/main/bridge_roles.c<br>index a9b95a3..6dbae6f 100644<br>--- a/main/bridge_roles.c<br>+++ b/main/bridge_roles.c<br>@@ -51,12 +51,12 @@<br> <br> struct bridge_role {<br>    AST_LIST_ENTRY(bridge_role) list;<br>-    AST_LIST_HEAD(, bridge_role_option) options;<br>+ AST_LIST_HEAD_NOLOCK(, bridge_role_option) options;<br>   char role[AST_ROLE_LEN];<br> };<br> <br> struct bridge_roles_datastore {<br>-   AST_LIST_HEAD(, bridge_role) role_list;<br>+      AST_LIST_HEAD_NOLOCK(, bridge_role) role_list;<br> };<br> <br> /*!<br>@@ -127,6 +127,8 @@<br>             ast_datastore_free(datastore);<br>                return NULL;<br>  }<br>+<br>+ AST_LIST_HEAD_INIT_NOLOCK(&roles_datastore->role_list);<br> <br>     datastore->data = roles_datastore;<br>         ast_channel_datastore_add(chan, datastore);<br>@@ -264,6 +266,8 @@<br>              return -1;<br>    }<br> <br>+ AST_LIST_HEAD_INIT_NOLOCK(&role->options);<br>+<br>  ast_copy_string(role->role, role_name, sizeof(role->role));<br> <br>  AST_LIST_INSERT_TAIL(&roles_datastore->role_list, role, list);<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8218">change 8218</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8218"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I4bc39ec33bc3ff77e1a971a01ace87deb965be3f </div>
<div style="display:none"> Gerrit-Change-Number: 8218 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>