Index: main/autoservice.c =================================================================== --- main/autoservice.c (revision 162886) +++ main/autoservice.c (working copy) @@ -110,6 +110,15 @@ continue; } + for (i = 0; i < x; ++i) { + if (ast_channel_trylock(mons[x])) { + if (i < (x - 1)) { + memmove(&mons[x], &mons[x + 1], (x - (i + 1)) * sizeof(mons[0])); + } + --x; + } + } + chan = ast_waitfor_n(mons, x, &ms); if (!chan) { continue;