ensure that agent channels don't get seized during login (issue #5020)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6577 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
35d6651b46
commit
664813210f
|
@ -1749,6 +1749,11 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
|
||||||
if (!strcmp(p->agent, user) &&
|
if (!strcmp(p->agent, user) &&
|
||||||
!strcmp(p->password, pass) && !p->pending) {
|
!strcmp(p->password, pass) && !p->pending) {
|
||||||
login_state = 1; /* Successful Login */
|
login_state = 1; /* Successful Login */
|
||||||
|
|
||||||
|
/* Ensure we can't be gotten until we're done */
|
||||||
|
gettimeofday(&p->lastdisc, NULL);
|
||||||
|
p->lastdisc.tv_sec++;
|
||||||
|
|
||||||
/* Set Channel Specific Agent Overides */
|
/* Set Channel Specific Agent Overides */
|
||||||
if (pbx_builtin_getvar_helper(chan, "AGENTACKCALL") && strlen(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"))) {
|
if (pbx_builtin_getvar_helper(chan, "AGENTACKCALL") && strlen(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"))) {
|
||||||
if (!strcasecmp(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"), "always"))
|
if (!strcasecmp(pbx_builtin_getvar_helper(chan, "AGENTACKCALL"), "always"))
|
||||||
|
|
Reference in New Issue