diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-17 23:36:52 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-17 23:36:52 +0000 |
commit | 67460c2af45d0455e64623572480c064445c2e5b (patch) | |
tree | 90b001525f712a1523ae853e9d37660634c89a17 /libs/ardour/control_protocol_manager.cc | |
parent | cbb272af44b6a3e3cb807d70a46b5f6d0d7ed109 (diff) |
fix deadlock in protocol manager startup; fix some other ::set_session() SNAFUs; remove last boost::signals2::connection member from libardour
git-svn-id: svn://localhost/ardour2/branches/3.0@6375 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/control_protocol_manager.cc')
-rw-r--r-- | libs/ardour/control_protocol_manager.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc index 47f8d5bf98..1e793bb71b 100644 --- a/libs/ardour/control_protocol_manager.cc +++ b/libs/ardour/control_protocol_manager.cc @@ -110,6 +110,8 @@ ControlProtocolManager::session_going_away() ControlProtocol* ControlProtocolManager::instantiate (ControlProtocolInfo& cpi) { + /* CALLER MUST HOLD LOCK */ + if (_session == 0) { return 0; } @@ -126,8 +128,6 @@ ControlProtocolManager::instantiate (ControlProtocolInfo& cpi) return 0; } - - Glib::Mutex::Lock lm (protocols_lock); control_protocols.push_back (cpi.protocol); return cpi.protocol; @@ -172,6 +172,8 @@ ControlProtocolManager::load_mandatory_protocols () return; } + Glib::Mutex::Lock lm (protocols_lock); + for (list<ControlProtocolInfo*>::iterator i = control_protocol_info.begin(); i != control_protocol_info.end(); ++i) { if ((*i)->mandatory && ((*i)->protocol == 0)) { info << string_compose (_("Instantiating mandatory control protocol %1"), (*i)->name) << endmsg; @@ -293,6 +295,8 @@ ControlProtocolManager::set_state (const XMLNode& node, int /*version*/) XMLNodeConstIterator citer; XMLProperty* prop; + Glib::Mutex::Lock lm (protocols_lock); + clist = node.children(); for (citer = clist.begin(); citer != clist.end(); ++citer) { |