summaryrefslogtreecommitdiff
path: root/main/dial.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-03-08 13:24:46 +0000
committerJoshua Colp <jcolp@digium.com>2017-03-27 19:54:44 +0000
commit5d938045d465d66e28bb49816c482a8b68f99342 (patch)
tree50b25c29fc199a66c246c95871b492e242a68c7a /main/dial.c
parentf5603cb1ece5001d1288004c9bc6ed51448deb81 (diff)
channel: Remove old epoll support and fixed max number of file descriptors.
This change removes the old epoll support which has not been used or maintained in quite some time. The fixed number of file descriptors on a channel has also been removed. File descriptors are now contained in a growable vector. This can be used like before by specifying a specific position to store a file descriptor at or using a new API call, ast_channel_fd_add, which adds a file descriptor to the channel and returns its position. Tests have been added which cover the growing behavior of the vector and the new API call. ASTERISK-26885 Change-Id: I1a754b506c009b83dfdeeb08c2d2815db30ef928
Diffstat (limited to 'main/dial.c')
-rw-r--r--main/dial.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/main/dial.c b/main/dial.c
index cc2366ed7..d0492dcfd 100644
--- a/main/dial.c
+++ b/main/dial.c
@@ -479,9 +479,6 @@ static int begin_dial_channel(struct ast_dial_channel *channel, struct ast_chann
ast_hangup(channel->owner);
channel->owner = NULL;
} else {
- if (chan) {
- ast_poll_channel_add(chan, channel->owner);
- }
ast_channel_publish_dial(async ? NULL : chan, channel->owner, channel->device, NULL);
res = 1;
ast_verb(3, "Called %s\n", numsubst);
@@ -868,8 +865,6 @@ static enum ast_dial_result monitor_dial(struct ast_dial *dial, struct ast_chann
set_state(dial, AST_DIAL_RESULT_HANGUP);
break;
}
- if (chan)
- ast_poll_channel_del(chan, channel->owner);
ast_channel_publish_dial(chan, who, channel->device, ast_hangup_cause_to_dial_status(ast_channel_hangupcause(who)));
ast_hangup(who);
channel->owner = NULL;
@@ -890,8 +885,6 @@ static enum ast_dial_result monitor_dial(struct ast_dial *dial, struct ast_chann
AST_LIST_TRAVERSE(&dial->channels, channel, list) {
if (!channel->owner || channel->owner == who)
continue;
- if (chan)
- ast_poll_channel_del(chan, channel->owner);
ast_channel_publish_dial(chan, channel->owner, channel->device, "CANCEL");
ast_hangup(channel->owner);
channel->cause = AST_CAUSE_ANSWERED_ELSEWHERE;
@@ -915,8 +908,6 @@ static enum ast_dial_result monitor_dial(struct ast_dial *dial, struct ast_chann
AST_LIST_TRAVERSE(&dial->channels, channel, list) {
if (!channel->owner)
continue;
- if (chan)
- ast_poll_channel_del(chan, channel->owner);
ast_channel_publish_dial(chan, channel->owner, channel->device, "CANCEL");
ast_hangup(channel->owner);
channel->cause = AST_CAUSE_NORMAL_CLEARING;