diff --git a/funcs/func_groupcount.c b/funcs/func_groupcount.c index 181855015aa9badfdee49661342222fa992724d1..ecb927467846a962327603a6e3346fcb1eeb6286 100644 --- a/funcs/func_groupcount.c +++ b/funcs/func_groupcount.c @@ -107,7 +107,7 @@ static int group_count_function_read(struct ast_channel *chan, const char *cmd, struct ast_group_info *gi = NULL; ast_app_group_list_rdlock(); - for (gi = ast_app_group_list_head(); gi; gi = AST_LIST_NEXT(gi, list)) { + for (gi = ast_app_group_list_head(); gi; gi = AST_LIST_NEXT(gi, group_list)) { if (gi->chan != chan) continue; if (ast_strlen_zero(category) || (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, category))) @@ -170,7 +170,7 @@ static int group_function_read(struct ast_channel *chan, const char *cmd, ast_app_group_list_rdlock(); - for (gi = ast_app_group_list_head(); gi; gi = AST_LIST_NEXT(gi, list)) { + for (gi = ast_app_group_list_head(); gi; gi = AST_LIST_NEXT(gi, group_list)) { if (gi->chan != chan) continue; if (ast_strlen_zero(data)) @@ -225,7 +225,7 @@ static int group_list_function_read(struct ast_channel *chan, const char *cmd, ast_app_group_list_rdlock(); - for (gi = ast_app_group_list_head(); gi; gi = AST_LIST_NEXT(gi, list)) { + for (gi = ast_app_group_list_head(); gi; gi = AST_LIST_NEXT(gi, group_list)) { if (gi->chan != chan) continue; if (!ast_strlen_zero(tmp1)) { diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index f4038a2a887b99b4e46494d8342c03397d17dbb0..cdf34793e5150419a8a638962d7d0fabdbac6e7f 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -2015,7 +2015,7 @@ struct ast_group_info { struct ast_channel *chan; char *category; char *group; - AST_LIST_ENTRY(ast_group_info) list; + AST_LIST_ENTRY(ast_group_info) group_list; }; diff --git a/main/app.c b/main/app.c index b94657b4c7ac6f6b6a7795b45a14c8f64bc4f539..8e28b0c9aa5f10a302a2e84617cf510850386f79 100644 --- a/main/app.c +++ b/main/app.c @@ -1014,9 +1014,9 @@ int ast_app_group_set_channel(struct ast_channel *chan, const char *data) } AST_RWLIST_WRLOCK(&groups); - AST_RWLIST_TRAVERSE_SAFE_BEGIN(&groups, gi, list) { + AST_RWLIST_TRAVERSE_SAFE_BEGIN(&groups, gi, group_list) { if ((gi->chan == chan) && ((ast_strlen_zero(category) && ast_strlen_zero(gi->category)) || (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, category)))) { - AST_RWLIST_REMOVE_CURRENT(list); + AST_RWLIST_REMOVE_CURRENT(group_list); free(gi); break; } @@ -1033,7 +1033,7 @@ int ast_app_group_set_channel(struct ast_channel *chan, const char *data) gi->category = (char *) gi + sizeof(*gi) + strlen(group) + 1; strcpy(gi->category, category); } - AST_RWLIST_INSERT_TAIL(&groups, gi, list); + AST_RWLIST_INSERT_TAIL(&groups, gi, group_list); } else { res = -1; } @@ -1053,7 +1053,7 @@ int ast_app_group_get_count(const char *group, const char *category) } AST_RWLIST_RDLOCK(&groups); - AST_RWLIST_TRAVERSE(&groups, gi, list) { + AST_RWLIST_TRAVERSE(&groups, gi, group_list) { if (!strcasecmp(gi->group, group) && (ast_strlen_zero(category) || (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, category)))) { count++; } @@ -1079,7 +1079,7 @@ int ast_app_group_match_get_count(const char *groupmatch, const char *category) } AST_RWLIST_RDLOCK(&groups); - AST_RWLIST_TRAVERSE(&groups, gi, list) { + AST_RWLIST_TRAVERSE(&groups, gi, group_list) { if (!regexec(®exbuf, gi->group, 0, NULL, 0) && (ast_strlen_zero(category) || (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, category)))) { count++; } @@ -1096,11 +1096,11 @@ int ast_app_group_update(struct ast_channel *old, struct ast_channel *new) struct ast_group_info *gi = NULL; AST_RWLIST_WRLOCK(&groups); - AST_RWLIST_TRAVERSE_SAFE_BEGIN(&groups, gi, list) { + AST_RWLIST_TRAVERSE_SAFE_BEGIN(&groups, gi, group_list) { if (gi->chan == old) { gi->chan = new; } else if (gi->chan == new) { - AST_RWLIST_REMOVE_CURRENT(list); + AST_RWLIST_REMOVE_CURRENT(group_list); ast_free(gi); } } @@ -1115,9 +1115,9 @@ int ast_app_group_discard(struct ast_channel *chan) struct ast_group_info *gi = NULL; AST_RWLIST_WRLOCK(&groups); - AST_RWLIST_TRAVERSE_SAFE_BEGIN(&groups, gi, list) { + AST_RWLIST_TRAVERSE_SAFE_BEGIN(&groups, gi, group_list) { if (gi->chan == chan) { - AST_RWLIST_REMOVE_CURRENT(list); + AST_RWLIST_REMOVE_CURRENT(group_list); ast_free(gi); } } diff --git a/main/cli.c b/main/cli.c index d6ee56adfec0b2e5275750d4805e1e5ccbfaf2f2..1d3843183539d6807a64f9c8cb4d96a6411b04f7 100644 --- a/main/cli.c +++ b/main/cli.c @@ -1439,7 +1439,7 @@ static char *group_show_channels(struct ast_cli_entry *e, int cmd, struct ast_cl ast_cli(a->fd, FORMAT_STRING, gi->chan->name, gi->group, (ast_strlen_zero(gi->category) ? "(default)" : gi->category)); numchans++; } - gi = AST_LIST_NEXT(gi, list); + gi = AST_LIST_NEXT(gi, group_list); } ast_app_group_list_unlock();