aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-02-25 00:25:28 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-02-25 00:25:28 +0000
commitb83a2a470f84e07977ccd1d990feede00a2fdfa3 (patch)
tree78cad834ecde92a3f43fd9b0c525642ed0c2cf90 /channels
parent72cdf46f82b7db29922b67fdb7501bcbf44142aa (diff)
Add execiftime, remove duplicate agent logoff CLI
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5074 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_agent.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 8473b1337..481485c28 100755
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -1422,55 +1422,6 @@ static int agents_show(int fd, int argc, char **argv)
return RESULT_SUCCESS;
}
-static int agent_logoff(int fd, int argc, char **argv)
-{
- struct agent_pvt *p = NULL;
- char *line = NULL;
- int res = 0;
-
- /* Check args */
- if (argc != 3)
- return RESULT_SHOWUSAGE;
-
- line = argv[2];
-
- ast_mutex_lock(&agentlock);
- p = agents;
- while (p) {
- ast_mutex_lock(&p->lock);
- res = strcmp(p->agent, line);
-
- if (!res) {
- /* Found him! Now we're going to kill him. */
-
- if (ast_strlen_zero(p->loginchan)) {
- ast_cli(fd, "Agent %s already logged off the system.\n", line);
- ast_mutex_unlock(&p->lock);
- break;
- }
-
- strcpy(p->loginchan, ""); /* Bang! Killed him */
- ast_cli(fd, "Agent %s successfully logged off.\n", line);
- ast_mutex_unlock(&p->lock);
- break;
- }
-
- ast_mutex_unlock(&p->lock);
- p = p->next;
- }
- ast_mutex_unlock(&agentlock);
- if (res) ast_cli(fd, "Unable to find agent %s.\n", line);
- return RESULT_SUCCESS;
-}
-
-static char agent_logoff_usage[] =
-"Usage: agent logoff <agentnum>\n"
-" Log an agent off the system that maybe forgot to log off, etc....\n";
-
-static struct ast_cli_entry cli_agent_logoff = {
- { "agent", "logoff", NULL }, agent_logoff,
- "Log an agent off of the system", agent_logoff_usage, NULL};
-
static char show_agents_usage[] =
"Usage: show agents\n"
" Provides summary information on agents.\n";