aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-09-10 19:10:46 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-09-10 19:10:46 +0000
commitaedf63850a4383d5395b60a4132b1781b0e63987 (patch)
treea8220484f33f4bbfc63d9ba73eae9152770b6c09
parent186620c643be4bf689b73af76c0f1f7a323fbf30 (diff)
Fixing a problem where NULL channels would cause a crash when calling indisposed queue members (i.e. paused, wrapup time not completed, etc.)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82185 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_queue.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 5848bb2e1..d0b6affc0 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2079,8 +2079,10 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
starttime = (long) time(NULL);
#ifdef HAVE_EPOLL
- for (epollo = outgoing; epollo; epollo = epollo->q_next)
- ast_poll_channel_add(in, epollo->chan);
+ for (epollo = outgoing; epollo; epollo = epollo->q_next) {
+ if(epollo->chan)
+ ast_poll_channel_add(in, epollo->chan);
+ }
#endif
while (*to && !peer) {
@@ -2287,8 +2289,10 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
}
#ifdef HAVE_EPOLL
- for(epollo = outgoing; epollo; epollo = epollo->q_next)
- ast_poll_channel_del(in, epollo->chan);
+ for(epollo = outgoing; epollo; epollo = epollo->q_next) {
+ if(epollo->chan)
+ ast_poll_channel_del(in, epollo->chan);
+ }
#endif
return peer;