mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-21 09:10:36 +00:00
Remove the file descriptors from the main poll channel when the channel is hung up during the dialing attempt, and make sure a channel exists before trying to remove it at the end.
(closes issue #11441) Reported by: blitzrage git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -646,6 +646,9 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
|
|||||||
f = ast_read(winner);
|
f = ast_read(winner);
|
||||||
if (!f) {
|
if (!f) {
|
||||||
in->hangupcause = c->hangupcause;
|
in->hangupcause = c->hangupcause;
|
||||||
|
#ifdef HAVE_EPOLL
|
||||||
|
ast_poll_channel_del(in, c);
|
||||||
|
#endif
|
||||||
ast_hangup(c);
|
ast_hangup(c);
|
||||||
c = o->chan = NULL;
|
c = o->chan = NULL;
|
||||||
ast_clear_flag64(o, DIAL_STILLGOING);
|
ast_clear_flag64(o, DIAL_STILLGOING);
|
||||||
@@ -852,8 +855,10 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_EPOLL
|
#ifdef HAVE_EPOLL
|
||||||
for (epollo = outgoing; epollo; epollo = epollo->next)
|
for (epollo = outgoing; epollo; epollo = epollo->next) {
|
||||||
ast_poll_channel_del(in, epollo->chan);
|
if (epollo->chan)
|
||||||
|
ast_poll_channel_del(in, epollo->chan);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return peer;
|
return peer;
|
||||||
|
|||||||
Reference in New Issue
Block a user