From 90ac43a8d83b923ebd634ea73f172c1404b5f1f5 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 21 Jan 2009 17:44:41 +0000 Subject: Fix some confusion about relative / non-relative port names. Add some asserts to keep track of what is happening. git-svn-id: svn://localhost/ardour2/branches/3.0@4424 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/bundle.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libs/ardour/bundle.cc') diff --git a/libs/ardour/bundle.cc b/libs/ardour/bundle.cc index 379a3d4c2b..70800b06eb 100644 --- a/libs/ardour/bundle.cc +++ b/libs/ardour/bundle.cc @@ -47,12 +47,13 @@ Bundle::channel_ports (uint32_t c) const /** Add an association between one of our channels and a port. * @param ch Channel index. - * @param portname port name to associate with. + * @param portname full port name to associate with (including prefix). */ void Bundle::add_port_to_channel (uint32_t ch, string portname) { assert (ch < nchannels()); + assert (portname.find_first_of (':') != string::npos); { Glib::Mutex::Lock lm (_channel_mutex); @@ -99,10 +100,15 @@ Bundle::operator== (const Bundle& other) const } +/** Set a single port to be associated with a channel, removing any others. + * @param ch Channel. + * @param portname Full port name, including prefix. + */ void Bundle::set_port (uint32_t ch, string portname) { assert (ch < nchannels()); + assert (portname.find_first_of (':') != string::npos); { Glib::Mutex::Lock lm (_channel_mutex); -- cgit v1.2.3