aboutsummaryrefslogtreecommitdiffstats
path: root/main/autoservice.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-02 17:11:38 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-02 17:11:38 +0000
commit6e39b348bdccc39c8f5a9997c0cc1920857c6f6b (patch)
tree01803cdef40af4aed5d68e6849426e5a0ad0c9b3 /main/autoservice.c
parent7e93ed031d8d66ca8f38ff7c2a45e3684a5fed78 (diff)
Merged revisions 273718 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r273718 | tilghman | 2010-07-02 12:10:59 -0500 (Fri, 02 Jul 2010) | 15 lines Merged revisions 273717 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r273717 | tilghman | 2010-07-02 12:09:47 -0500 (Fri, 02 Jul 2010) | 8 lines Autoservice loop optimization causes a busy loop, when channels are serviced while in hangup. (closes issue #17564) Reported by: ramonpeek Patches: 20100630__issue17564.diff.txt uploaded by tilghman (license 14) Tested by: ramonpeek ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@273719 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/autoservice.c')
-rw-r--r--main/autoservice.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/autoservice.c b/main/autoservice.c
index 0a963097d..6b9633301 100644
--- a/main/autoservice.c
+++ b/main/autoservice.c
@@ -110,6 +110,11 @@ static void *autoservice_run(void *ign)
AST_LIST_UNLOCK(&aslist);
if (!x) {
+ /* If we don't sleep, this becomes a busy loop, which causes
+ * problems when Asterisk runs at a different priority than other
+ * user processes. As long as we check for new channels at least
+ * once every 10ms, we should be fine. */
+ usleep(10000);
continue;
}