[Asterisk-code-review] res musiconhold: moh general section is a class and issues w... (asterisk[14])

Richard Mudgett asteriskteam at digium.com
Wed Mar 8 15:33:13 CST 2017


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/5145 )

Change subject: res_musiconhold: moh general section is a class and issues warning
......................................................................


Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/#/c/5145/2/res/res_musiconhold.c
File res/res_musiconhold.c:

PS2, Line 1743: 		if (!strcasecmp(cat, "general")) {
              : 			for (var = ast_variable_browse(cfg, cat); var; var = var->next) {
              : 				if (!strcasecmp(var->name, "cachertclasses")) {
              : 					ast_set2_flag(global_flags, ast_true(var->value), MOH_CACHERTCLASSES);
              : 				} else if (!strcasecmp(var->name, "preferchannelclass")) {
              : 					ast_set2_flag(global_flags, ast_true(var->value), MOH_PREFERCHANNELCLASS);
              : 				} else {
              : 					ast_log(LOG_WARNING, "Unknown option '%s' in [general] section of musiconhold.conf\n", var->name);
              : 				}
              : 			}
              : 		}
              : 
              : 		if (!strcasecmp(cat, "general")) {
              : 			continue;
              : 		}
The restored "general" check is redundant.  Put the continue after the for statement.


-- 
To view, visit https://gerrit.asterisk.org/5145
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia3dbd11ea2b43ab3e6c820a9827811dd24bea82d
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Daniel Journo <dan at keshercommunications.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list