|
|
|
@ -774,21 +774,6 @@ static int agent_hangup(struct ast_channel *ast)
|
|
|
|
|
ast_mutex_unlock(&p->chan->lock);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#if 0
|
|
|
|
|
ast_mutex_unlock(&p->lock);
|
|
|
|
|
/* Release ownership of the agent to other threads (presumably running the login app). */
|
|
|
|
|
ast_mutex_unlock(&p->app_lock);
|
|
|
|
|
} else if (p->dead) {
|
|
|
|
|
/* Go ahead and lose it */
|
|
|
|
|
ast_mutex_unlock(&p->lock);
|
|
|
|
|
/* Release ownership of the agent to other threads (presumably running the login app). */
|
|
|
|
|
ast_mutex_unlock(&p->app_lock);
|
|
|
|
|
} else {
|
|
|
|
|
ast_mutex_unlock(&p->lock);
|
|
|
|
|
/* Release ownership of the agent to other threads (presumably running the login app). */
|
|
|
|
|
ast_mutex_unlock(&p->app_lock);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
ast_mutex_unlock(&p->lock);
|
|
|
|
|
ast_device_state_changed("Agent/%s", p->agent);
|
|
|
|
|
|
|
|
|
@ -2302,7 +2287,6 @@ static void reload_agents(void)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*--- agent_devicestate: Part of PBX channel interface ---*/
|
|
|
|
|
static int agent_devicestate(void *data)
|
|
|
|
|
{
|
|
|
|
|