summaryrefslogtreecommitdiff
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-08-08 21:44:58 +0000
committerJoshua Colp <jcolp@digium.com>2007-08-08 21:44:58 +0000
commit22114b509dc93cd3f19610362bf3757db2c04787 (patch)
treed42170fbe8a83884d32f1ed09f238da151554071 /apps/app_dial.c
parent063c747f3a7120dca404ca845877019dc8c2a62d (diff)
Add support for using epoll instead of poll. This should increase scalability and is done in such a way that we should be able to add support for other poll() replacements.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 758426f6d..f118b7cb2 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -560,6 +560,9 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
struct ast_channel *peer = NULL;
/* single is set if only one destination is enabled */
int single = outgoing && !outgoing->next && !ast_test_flag64(outgoing, OPT_MUSICBACK | OPT_RINGBACK);
+#ifdef HAVE_EPOLL
+ struct chanlist *epollo;
+#endif
if (single) {
/* Turn off hold music, etc */
@@ -567,7 +570,11 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
/* If we are calling a single channel, make them compatible for in-band tone purpose */
ast_channel_make_compatible(outgoing->chan, in);
}
-
+
+#ifdef HAVE_EPOLL
+ for (epollo = outgoing; epollo; epollo = epollo->next)
+ ast_poll_channel_add(in, epollo->chan);
+#endif
while (*to && !peer) {
struct chanlist *o;
@@ -814,6 +821,11 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
}
+#ifdef HAVE_EPOLL
+ for (epollo = outgoing; epollo; epollo = epollo->next)
+ ast_poll_channel_del(in, epollo->chan);
+#endif
+
return peer;
}