[asterisk-commits] mmichelson: trunk r81632 - /trunk/apps/app_queue.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 5 16:59:53 CDT 2007
Author: mmichelson
Date: Wed Sep 5 16:59:52 2007
New Revision: 81632
URL: http://svn.digium.com/view/asterisk?view=rev&rev=81632
Log:
Not having this epoll specific code in wait_for_answer was causing app_queue to infinitely loop.
This makes it so it doesn't. Thanks to file for pointing out where the problem was and showing
a similar function in app_dial as an example of how to fix it.
Modified:
trunk/apps/app_queue.c
Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?view=diff&rev=81632&r1=81631&r2=81632
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Wed Sep 5 16:59:52 2007
@@ -2041,9 +2041,16 @@
char on[80] = "";
char membername[80] = "";
long starttime = 0;
- long endtime = 0;
+ long endtime = 0;
+#ifdef HAVE_EPOLL
+ struct callattempt *epollo;
+#endif
starttime = (long) time(NULL);
+#ifdef HAVE_EPOLL
+ for (epollo = outgoing; epollo; epollo = epollo->q_next)
+ ast_poll_channel_add(in, epollo->chan);
+#endif
while (*to && !peer) {
int numlines, retry, pos = 1;
@@ -2248,6 +2255,11 @@
rna(orig, qe, on, membername);
}
+#ifdef HAVE_EPOLL
+ for(epollo = outgoing; epollo; epollo = epollo->q_next)
+ ast_poll_channel_del(in, epollo->chan);
+#endif
+
return peer;
}
More information about the asterisk-commits
mailing list