mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 11:42:27 +00:00
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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user