Merge "res_pjsip: Endpoint destruction does not free DTLS configuration"
authorJenkins2 <jenkins2@gerrit.asterisk.org>
Mon, 19 Feb 2018 12:23:35 +0000 (06:23 -0600)
committerGerrit Code Review <gerrit2@gerrit.digium.api>
Mon, 19 Feb 2018 12:23:35 +0000 (06:23 -0600)
main/bridge_roles.c

index a9b95a3..6dbae6f 100644 (file)
@@ -51,12 +51,12 @@ struct bridge_role_option {
 
 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;
 };
 
 /*!
@@ -128,6 +128,8 @@ static struct bridge_roles_datastore *setup_bridge_roles_datastore(struct ast_ch
                return NULL;
        }
 
+       AST_LIST_HEAD_INIT_NOLOCK(&roles_datastore->role_list);
+
        datastore->data = roles_datastore;
        ast_channel_datastore_add(chan, datastore);
        return roles_datastore;
@@ -264,6 +266,8 @@ static int setup_bridge_role(struct bridge_roles_datastore *roles_datastore, con
                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);