summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-09-10 11:23:12 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-09-10 11:35:57 -0400
commitcb85080ca8e8a1f23cd9017587fe48a66c442274 (patch)
treecc818eb71bfcf8bdfb63a19b92a9270bcfeb14a0
parenta86aa9e5bc4d2520087310caa4afb3508480b0d7 (diff)
fix deadlock when removing routes and using JACK1.
graph reorder callback needed an early exit if we were deleting routes, is all.
-rw-r--r--libs/ardour/session.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 91578c9b17..94a12ca504 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -3346,6 +3346,8 @@ Session::add_internal_send (boost::shared_ptr<Route> dest, boost::shared_ptr<Pro
void
Session::remove_routes (boost::shared_ptr<RouteList> routes_to_remove)
{
+ PBD::Unwinder<bool> uw_flag (_route_deletion_in_progress, true);
+
{ // RCU Writer scope
RCUWriter<RouteList> writer (routes);
boost::shared_ptr<RouteList> rs = writer.get_copy ();
@@ -3441,7 +3443,6 @@ Session::remove_routes (boost::shared_ptr<RouteList> routes_to_remove)
/* try to cause everyone to drop their references
* and unregister ports from the backend
*/
- PBD::Unwinder<bool> uw_flag (_route_deletion_in_progress, true);
for (RouteList::iterator iter = routes_to_remove->begin(); iter != routes_to_remove->end(); ++iter) {
(*iter)->drop_references ();
@@ -4878,7 +4879,7 @@ Session::graph_reordered ()
from a set_state() call or creating new tracks. Ditto for deletion.
*/
- if ((_state_of_the_state & (InitialConnecting|Deletion)) || _adding_routes_in_progress || _reconnecting_routes_in_progress) {
+ if ((_state_of_the_state & (InitialConnecting|Deletion)) || _adding_routes_in_progress || _reconnecting_routes_in_progress || _route_deletion_in_progress) {
return;
}