summaryrefslogtreecommitdiff
path: root/libs/ardour/port_manager.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-09-05 21:39:43 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-09-05 21:39:43 -0400
commit94efddd240f0cef752bfba5e1ccb06eb952221d1 (patch)
tree6ef76faea8c524827941d3350c469591d3ef6d19 /libs/ardour/port_manager.cc
parentbc1cc154dc5b67cd49bbca87537331af3328f85b (diff)
fix a problem creating and displaying connected status for ports not owned by ardour (e.g. system:....)
This was caused by using jack_port_get_connections() which will not return the correct status for ports owned by another JACK client. Because of the potential for deadlock by calling jack_port_get_all_connections(), an extra argument was added to several PortEngine:: API calls to specify whether the call is in a process-callback context, which defaults to true. The only place where false is passed is within the GlobalPortMatrix when we need to determine whether two non-ardour ports are connected.
Diffstat (limited to 'libs/ardour/port_manager.cc')
-rw-r--r--libs/ardour/port_manager.cc22
1 files changed, 16 insertions, 6 deletions
diff --git a/libs/ardour/port_manager.cc b/libs/ardour/port_manager.cc
index 4e467e3008..1758ea4a3f 100644
--- a/libs/ardour/port_manager.cc
+++ b/libs/ardour/port_manager.cc
@@ -385,8 +385,13 @@ PortManager::connect (const string& source, const string& destination)
} else if (dst) {
ret = dst->connect (s);
} else {
- /* neither port is known to us, and this API isn't intended for use as a general patch bay */
- ret = -1;
+ /* neither port is known to us ...hand-off to the PortEngine
+ */
+ if (_impl) {
+ ret = _impl->connect (s, d);
+ } else {
+ ret = -1;
+ }
}
if (ret > 0) {
@@ -412,12 +417,17 @@ PortManager::disconnect (const string& source, const string& destination)
boost::shared_ptr<Port> dst = get_port_by_name (d);
if (src) {
- ret = src->disconnect (d);
+ ret = src->disconnect (d);
} else if (dst) {
- ret = dst->disconnect (s);
+ ret = dst->disconnect (s);
} else {
- /* neither port is known to us, and this API isn't intended for use as a general patch bay */
- ret = -1;
+ /* neither port is known to us ...hand-off to the PortEngine
+ */
+ if (_impl) {
+ ret = _impl->disconnect (s, d);
+ } else {
+ ret = -1;
+ }
}
return ret;
}