summaryrefslogtreecommitdiff
path: root/libs/ardour/session_butler.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-04-06 18:15:27 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-04-06 18:15:27 +0000
commita2d2b69be208a27f334ffe5d503bbcb170f95291 (patch)
treeb71799bc3dc588125d314f5de1a5f0a5b2eb4cd8 /libs/ardour/session_butler.cc
parent0bd844bd10618108a3068071a85c24baaabb7bf8 (diff)
fix 100% CPU usage after killing JACK caused by faulty logic in butler thread main loop
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6864 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_butler.cc')
-rw-r--r--libs/ardour/session_butler.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/session_butler.cc b/libs/ardour/session_butler.cc
index 9d4ee5678b..073371dc17 100644
--- a/libs/ardour/session_butler.cc
+++ b/libs/ardour/session_butler.cc
@@ -175,7 +175,7 @@ Session::butler_thread_work ()
while (true) {
pfd[0].fd = butler_request_pipe[0];
pfd[0].events = POLLIN|POLLERR|POLLHUP;
-
+
if (poll (pfd, 1, (disk_work_outstanding ? 0 : -1)) < 0) {
if (errno == EINTR) {
@@ -281,7 +281,7 @@ Session::butler_thread_work ()
}
- if (i != dsl->end()) {
+ if (i != dsl->begin() && i != dsl->end()) {
/* we didn't get to all the streams */
disk_work_outstanding = true;
}
@@ -333,8 +333,8 @@ Session::butler_thread_work ()
*/
request_stop ();
}
-
- if (i != dsl->end()) {
+
+ if (i != dsl->begin() && i != dsl->end()) {
/* we didn't get to all the streams */
disk_work_outstanding = true;
}