mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Improve error message in CONFBRIDGE_INFO
Provided a more descriptive error message when a value supplied for the parameter type is not one of the acceptable values. (closes issue ASTERISK-18717) Reported by: Paul Belanger Patches: __20111103-better-confbridge_info-error-msg.txt (License #4999) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2700,7 +2700,8 @@ static int func_confbridge_info(struct ast_channel *chan, const char *cmd, char
|
|||||||
} else if (!strncasecmp(args.type, "locked", 6)) {
|
} else if (!strncasecmp(args.type, "locked", 6)) {
|
||||||
count = bridge->locked;
|
count = bridge->locked;
|
||||||
} else {
|
} else {
|
||||||
ast_log(LOG_ERROR, "Invalid keyword.\n");
|
ast_log(LOG_ERROR, "Invalid keyword '%s' passed to CONFBRIDGE_INFO. Should be one of: "
|
||||||
|
"parties, admins, marked, or locked.\n", args.type);
|
||||||
}
|
}
|
||||||
snprintf(buf, len, "%d", count);
|
snprintf(buf, len, "%d", count);
|
||||||
ao2_unlock(bridge);
|
ao2_unlock(bridge);
|
||||||
|
Reference in New Issue
Block a user