summaryrefslogtreecommitdiff
path: root/libs/surfaces/mackie/mackie_control_protocol_poll.cc
diff options
context:
space:
mode:
authorJohn Anderson <ardour@semiosix.com>2007-03-10 21:54:18 +0000
committerJohn Anderson <ardour@semiosix.com>2007-03-10 21:54:18 +0000
commit3c4cdadfd7a7a407431b9e56803c67782712f67b (patch)
tree435bb69747309f815a8052b0a8612f66102e911f /libs/surfaces/mackie/mackie_control_protocol_poll.cc
parent45e61c210d0efb0bc72bc3061e2b8b886547161d (diff)
clean up shutdown
git-svn-id: svn://localhost/ardour2/trunk@1571 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/mackie_control_protocol_poll.cc')
-rw-r--r--libs/surfaces/mackie/mackie_control_protocol_poll.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol_poll.cc b/libs/surfaces/mackie/mackie_control_protocol_poll.cc
index 875b19705e..1c5c67ba55 100644
--- a/libs/surfaces/mackie/mackie_control_protocol_poll.cc
+++ b/libs/surfaces/mackie/mackie_control_protocol_poll.cc
@@ -41,7 +41,7 @@ void * MackieControlProtocol::monitor_work()
pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, 0);
// read from midi ports
- while ( true )
+ while ( _polling )
{
try
{
@@ -61,15 +61,12 @@ void * MackieControlProtocol::monitor_work()
{
cout << "caught exception in MackieControlProtocol::monitor_work " << e.what() << endl;
}
-
- // provide a cancellation point
- pthread_testcancel();
}
- // these never get called because of cancellation point above
- cout << "MackieControlProtocol::poll_ports exiting" << endl;
-
+ // TODO ports and pfd and nfds should be in a separate class
delete[] pfd;
+ pfd = 0;
+ nfds = 0;
return (void*) 0;
}