diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-11-06 22:17:47 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-11-06 22:17:47 +0000 |
commit | 63348802e663c36014bdf5eb4a725f1b99c13574 (patch) | |
tree | 961554fee376460f00e2095ce1fd39e7507b5028 /channels/chan_agent.c | |
parent | 0c5c17e5ac78fe6215c3fa92c591534e989fff98 (diff) |
don't loop forever on an invalid options string (issue #5629)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6989 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_agent.c')
-rwxr-xr-x | channels/chan_agent.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c index f886288b8..7cacdb228 100755 --- a/channels/chan_agent.c +++ b/channels/chan_agent.c @@ -1658,13 +1658,12 @@ static struct ast_cli_entry cli_agent_logoff = { STANDARD_LOCAL_USER; LOCAL_USER_DECL; -/** - * Log in agent application. +/*! + * \brief Log in agent application. * - * @param chan - * @param data - * @param callbackmode - * @returns + * \param chan + * \param data + * \param callbackmode non-zero for AgentCallbackLogin */ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode) { @@ -1736,10 +1735,9 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode) context = parse; } - while (!ast_strlen_zero(args.options)) { - if (*args.options == 's') { + if (!ast_strlen_zero(args.options)) { + if (strchr(args.options, 's')) { play_announcement = 0; - break; } } |