mac++; /* Leave the "m" in the string */
while (*mac && (*mac != ')'))
*(mac++) = 'X';
- if (*mac)
+ if (*mac) {
*mac = 'X';
- else {
+ mac = strchr(mohclass, ')');
+ if (mac)
+ *mac = '\0';
+ else {
+ ast_log(LOG_WARNING, "Music on hold class specified without trailing ')'\n");
+ mohclass = NULL;
+ }
+ } else {
ast_log(LOG_WARNING, "Could not find music on hold class to use, assuming default.\n");
mohclass=NULL;
}
- mac = strchr(macroname, ')');
- if (mac)
- *mac = '\0';
- else {
- ast_log(LOG_WARNING, "Music on hold class specified without trailing ')'\n");
- mohclass = NULL;
- }
}
/* Extract privacy info from transfer */
if ((s = strstr(transfer, "P("))) {
} else
transferdigittimeout = transferdigittimeout * 1000;
} else if (!strcasecmp(var->name, "featuredigittimeout")) {
- if ((sscanf(var->value, "%d", &featuredigittimeout) != 1) || (transferdigittimeout < 1)) {
+ if ((sscanf(var->value, "%d", &featuredigittimeout) != 1) || (featuredigittimeout < 1)) {
ast_log(LOG_WARNING, "%s is not a valid featuredigittimeout\n", var->value);
featuredigittimeout = DEFAULT_FEATURE_DIGIT_TIMEOUT;
}