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:
Joshua Colp
2017-03-08 13:24:46 +00:00
parent f5603cb1ec
commit 5d938045d4
7 changed files with 201 additions and 405 deletions

View File

@@ -4794,9 +4794,6 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
char membername[80] = "";
long starttime = 0;
long endtime = 0;
#ifdef HAVE_EPOLL
struct callattempt *epollo;
#endif
char *inchan_name;
struct timeval start_time_tv = ast_tvnow();
int canceled_by_caller = 0; /* 1 when caller hangs up or press digit or press * */
@@ -4806,13 +4803,6 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
ast_channel_unlock(qe->chan);
starttime = (long) time(NULL);
#ifdef HAVE_EPOLL
for (epollo = outgoing; epollo; epollo = epollo->q_next) {
if (epollo->chan) {
ast_poll_channel_add(in, epollo->chan);
}
}
#endif
while ((*to = ast_remaining_ms(start_time_tv, orig)) && !peer) {
int numlines, retry, pos = 1;
@@ -5325,14 +5315,6 @@ skip_frame:;
publish_dial_end_event(qe->chan, outgoing, NULL, "NOANSWER");
}
#ifdef HAVE_EPOLL
for (epollo = outgoing; epollo; epollo = epollo->q_next) {
if (epollo->chan) {
ast_poll_channel_del(in, epollo->chan);
}
}
#endif
return peer;
}