diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-04-08 16:48:34 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-04-08 16:48:34 +0000 |
commit | ce35e913d0e7f059dc15e9677ff6b3c5287ff487 (patch) | |
tree | f067f0544acea153e41a20c22c7e44420ac31b79 /libs | |
parent | 33cd347529f5b745bc15658e05a0be187f40e988 (diff) |
rename only the main outs of a route when its name changes, not inserts or sends, which leads to port name collisions since the name gets shared with the route itself
git-svn-id: svn://localhost/ardour2/branches/3.0@9333 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/route.cc | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index f5fd4a682c..04100f6203 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -3271,22 +3271,20 @@ Route::set_name (const string& str) ret = (_input->set_name(name) && _output->set_name(name)); if (ret) { - - Glib::RWLock::ReaderLock lm (_processor_lock); - - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - - /* rename all I/O processors that have inputs or outputs */ - - boost::shared_ptr<IOProcessor> iop = boost::dynamic_pointer_cast<IOProcessor> (*i); - - if (iop && (iop->output() || iop->input())) { - if (!iop->set_name (name)) { - ret = false; - } + /* rename the main outs. Leave other IO processors + * with whatever name they already have, because its + * just fine as it is (it will not contain the route + * name if its a port insert, port send or port return). + */ + + if (_main_outs) { + if (_main_outs->set_name (name)) { + /* XXX returning false here is stupid because + we already changed the route name. + */ + return false; } } - } return ret; |