summaryrefslogtreecommitdiff
path: root/channels/chan_agent.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-06-12 13:34:57 +0000
committerJoshua Colp <jcolp@digium.com>2007-06-12 13:34:57 +0000
commitf519db04e4f23b2a52954906c6bbd446a3b5438f (patch)
tree67990b3dc6228b8eb6ebc349fa1a0ca71d52f6af /channels/chan_agent.c
parent897418858df889008b7a557626c22d5f334731a9 (diff)
Remove old stuff from the AgentCallbackLogin days and only autocomplete agents in the agent logoff CLI command that are logged in. (issue #9952 reported by eliel)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_agent.c')
-rw-r--r--channels/chan_agent.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 7ad477c07..17b09850d 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -119,15 +119,6 @@ static const char mandescr_agent_logoff[] =
" *Agent: Agent ID of the agent to log off\n"
" Soft: Set to 'true' to not hangup existing calls\n";
-static const char mandescr_agent_callback_login[] =
-"Description: Sets an agent as logged in with callback.\n"
-"Variables: (Names marked with * are required)\n"
-" *Agent: Agent ID of the agent to login\n"
-" *Exten: Extension to use for callback\n"
-" Context: Context to use for callback\n"
-" AckCall: Set to 'true' to require an acknowledgement by '#' when agent is called back\n"
-" WrapupTime: the minimum amount of time after disconnecting before the caller can receive a new call\n";
-
static char moh[80] = "default";
#define AST_MAX_AGENT 80 /*!< Agent ID or Password max length */
@@ -1397,7 +1388,7 @@ static force_inline int powerof(unsigned int d)
* \param s
* \param m
* \returns
- * \sa action_agent_logoff(), action_agent_callback_login(), load_module().
+ * \sa action_agent_logoff(), load_module().
*/
static int action_agents(struct mansession *s, const struct message *m)
{
@@ -1562,7 +1553,7 @@ static int agent_logoff_cmd(int fd, int argc, char **argv)
* \param s
* \param m
* \returns
- * \sa action_agents(), action_agent_callback_login(), load_module().
+ * \sa action_agents(), load_module().
*/
static int action_agent_logoff(struct mansession *s, const struct message *m)
{
@@ -1595,7 +1586,7 @@ static char *complete_agent_logoff_cmd(const char *line, const char *word, int p
AST_LIST_TRAVERSE(&agents, p, list) {
snprintf(name, sizeof(name), "Agent/%s", p->agent);
- if (!strncasecmp(word, name, len) && ++which > state)
+ if (!strncasecmp(word, name, len) && p->loginstart && ++which > state)
return ast_strdup(name);
}
} else if (pos == 3 && state == 0)