[Asterisk-cvs] asterisk/channels chan_agent.c,1.125,1.126
markster at lists.digium.com
markster at lists.digium.com
Tue Mar 22 13:15:47 CST 2005
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv16924/channels
Modified Files:
chan_agent.c
Log Message:
Fix chan_agent segfault (bug #3590)
Index: chan_agent.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_agent.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- chan_agent.c 5 Mar 2005 05:43:15 -0000 1.125
+++ chan_agent.c 22 Mar 2005 19:10:21 -0000 1.126
@@ -381,10 +381,10 @@
if (!f) {
/* If there's a channel, hang it up (if it's on a callback) make it NULL */
if (p->chan) {
+ p->chan->_bridge = NULL;
/* Note that we don't hangup if it's not a callback because Asterisk will do it
for us when the PBX instance that called login finishes */
if (!ast_strlen_zero(p->loginchan)) {
- p->chan->_bridge = NULL;
if (p->chan)
ast_log(LOG_DEBUG, "Bridge on '%s' being cleared (2)\n", p->chan->name);
ast_hangup(p->chan);
@@ -639,6 +639,7 @@
} else
p->start = 0;
if (p->chan) {
+ p->chan->_bridge = NULL;
/* If they're dead, go ahead and hang up on the agent now */
if (!ast_strlen_zero(p->loginchan)) {
/* Store last disconnect time */
@@ -2119,7 +2120,7 @@
ast_register_application(app2, callback_exec, synopsis2, descrip2);
ast_register_application(app3, agentmonitoroutgoing_exec, synopsis3, descrip3);
/* Manager command */
- ast_manager_register2("Agents", 0, action_agents, "Lists agents and their status", mandescr_agents);
+ ast_manager_register2("Agents", EVENT_FLAG_AGENT, action_agents, "Lists agents and their status", mandescr_agents);
/* CLI Application */
ast_cli_register(&cli_show_agents);
ast_cli_register(&cli_agent_logoff);
More information about the svn-commits
mailing list