aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-23 01:41:35 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-23 01:41:35 +0000
commitec85d92c783f8e0bd3993f803ecd658bda2baa84 (patch)
tree660751d6174ee23c0b904c51b08fa76396d89cd6 /res
parent20c61e2de731f3d945ad34626c11a38a394accf7 (diff)
Yield before reading from zaptel timing source under Solaris so that other threads get a chance to do things. (issue #7875 reported by bob)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@51512 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_musiconhold.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 746fa2d06..04e4a39ee 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -45,6 +45,9 @@
#endif
#include <unistd.h>
#include <sys/ioctl.h>
+#ifdef SOLARIS
+#include <thread.h>
+#endif
#include "asterisk.h"
@@ -508,6 +511,9 @@ static void *monmp3thread(void *data)
}
}
if (class->pseudofd > -1) {
+#ifdef SOLARIS
+ thr_yield();
+#endif
/* Pause some amount of time */
res = read(class->pseudofd, buf, sizeof(buf));
pthread_testcancel();