[Asterisk-code-review] func_groupcount.c: Adding Group Variables and additional Group functions (asterisk[18])
N A
asteriskteam at digium.com
Sat Sep 17 11:33:43 CDT 2022
Attention is currently required from: Sean Bright, Mark Murawski.
N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/17655 )
Change subject: func_groupcount.c: Adding Group Variables and additional Group functions
......................................................................
Patch Set 14: Code-Review-1
(10 comments)
File funcs/func_groupcount.c:
https://gerrit.asterisk.org/c/asterisk/+/17655/comment/77eee47e_e2bad76b
PS11, Line 1385: ast_str_append(&out, 0, "%s,", ast_channel_name(gi->chan));
> Ah, is this new? […]
Additionally, given the snafu that has already happened here, I think a simple test for GROUP_CHANNEL_LIST would not hurt it.
The test should create a couple channels, assign them to the same group, and then verify the list (perhaps you set a global var in the right order). Critically there should not be a trailing comma at the end.
The same test or another could also verify that a group var can be set and retrieved.
File funcs/func_groupcount.c:
https://gerrit.asterisk.org/c/asterisk/+/17655/comment/68a0d2e3_7bea1588
PS14, Line 28: #include <regex.h>
By convention, asterisk.h always goes first.
Move regex.h to after asterisk.h but before the other includes.
https://gerrit.asterisk.org/c/asterisk/+/17655/comment/7f94e9f4_4d09f565
PS14, Line 593: buf[0] = 0;
Use '\0' for semantics, not 0
https://gerrit.asterisk.org/c/asterisk/+/17655/comment/ecb12943_c34ed21c
PS14, Line 600: if (ast_app_group_split_group(args.groupcategory, group, sizeof(group), category, sizeof(category)))
This needs braces for single line ifs, per the coding guidelines
https://gerrit.asterisk.org/c/asterisk/+/17655/comment/edf0c91f_372f5b87
PS14, Line 783: const char *group_match = NULL;
Whitespace should be tabs here
https://gerrit.asterisk.org/c/asterisk/+/17655/comment/3d8f3f32_f2ac2039
PS14, Line 795:
Whitespace/alignment/indentation also messed up here
File include/asterisk/channel.h:
https://gerrit.asterisk.org/c/asterisk/+/17655/comment/29ac0e3a_bf119274
PS14, Line 2931: struct varshead varshead; /*!< A linked list for group variables. See \ref AstGroupVar */
Remove one tab to align the comments
https://gerrit.asterisk.org/c/asterisk/+/17655/comment/bfd6a133_6b0e4231
PS14, Line 3164: * \since 20
I don't think \since 20 is accurate and can be removed. This will likely go into 18 as well.
File main/app.c:
https://gerrit.asterisk.org/c/asterisk/+/17655/comment/99300a61_37dbb81a
PS14, Line 2433:
Whitespace issues again here
https://gerrit.asterisk.org/c/asterisk/+/17655/comment/436fe9ab_2a4d975b
PS14, Line 2686: strncpy(gmi->group, group, (MAX_GROUP_LEN - 1));
Use ast_copy_string, not strncpy
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17655
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I23e48d1cdfc8adaffdfec2e936e56143603914f2
Gerrit-Change-Number: 17655
Gerrit-PatchSet: 14
Gerrit-Owner: Mark Murawski <markm at intellasoft.net>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-Attention: Sean Bright <sean at seanbright.com>
Gerrit-Attention: Mark Murawski <markm at intellasoft.net>
Gerrit-Comment-Date: Sat, 17 Sep 2022 16:33:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Comment-In-Reply-To: Mark Murawski <markm at intellasoft.net>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220917/4e14fc59/attachment.html>
More information about the asterisk-code-review
mailing list