aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_agent.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2011-05-03 20:45:32 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2011-05-03 20:45:32 +0000
commit681ceaeaace7706e84c5bc71c0d5253b2ae3f3a6 (patch)
treee1651180838e594a0203f863f3cdd084860e1bf5 /channels/chan_agent.c
parent39277e4ddd2ca81426bc72dfc62d8f5985d075d2 (diff)
Merged revisions 316265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines Fix a bunch of compiler warnings generated by gcc 4.6.0. Most of these are -Wunused-but-set-variable, but there were a few others mixed in here, as well. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@316293 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_agent.c')
-rw-r--r--channels/chan_agent.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 47df7cba6..0dc930f9d 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -887,7 +887,6 @@ int agent_set_base_channel(struct ast_channel *chan, struct ast_channel *base)
static int agent_hangup(struct ast_channel *ast)
{
struct agent_pvt *p = ast->tech_pvt;
- int howlong = 0;
ast_mutex_lock(&p->lock);
p->owner = NULL;
@@ -908,11 +907,8 @@ static int agent_hangup(struct ast_channel *ast)
ast_debug(1, "Hangup called for state %s\n", ast_state2str(ast->_state));
if (p->start && (ast->_state != AST_STATE_UP)) {
- howlong = time(NULL) - p->start;
p->start = 0;
- } else if (ast->_state == AST_STATE_RESERVED)
- howlong = 0;
- else
+ } else
p->start = 0;
if (p->chan) {
p->chan->_bridge = NULL;
@@ -1856,7 +1852,6 @@ static int login_exec(struct ast_channel *chan, const char *data)
int max_login_tries = maxlogintries;
struct agent_pvt *p;
struct ast_module_user *u;
- int login_state = 0;
char user[AST_MAX_AGENT] = "";
char pass[AST_MAX_AGENT];
char agent[AST_MAX_AGENT] = "";
@@ -1950,7 +1945,6 @@ static int login_exec(struct ast_channel *chan, const char *data)
ast_mutex_lock(&p->lock);
if (!strcmp(p->agent, user) &&
!strcmp(p->password, pass) && !p->pending) {
- login_state = 1; /* Successful Login */
/* Ensure we can't be gotten until we're done */
p->lastdisc = ast_tvnow();