summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/server/events/Connect.cpp1
-rw-r--r--src/server/events/Disconnect.cpp7
2 files changed, 5 insertions, 3 deletions
diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp
index f0ba39bb..09838978 100644
--- a/src/server/events/Connect.cpp
+++ b/src/server/events/Connect.cpp
@@ -111,6 +111,7 @@ Connect::pre_process()
provider...
*/
if (tail_block != head_block && tail_block->parent() == head_block->parent()) {
+ // The tail block is now a dependency (provider) of the head block
head_block->providers().insert(tail_block);
tail_block->dependants().insert(head_block);
}
diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp
index 13f419ce..43febed5 100644
--- a/src/server/events/Disconnect.cpp
+++ b/src/server/events/Disconnect.cpp
@@ -14,7 +14,7 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <list>
+#include <set>
#include "ingen/Store.hpp"
#include "raul/Maid.hpp"
@@ -72,11 +72,13 @@ Disconnect::Impl::Impl(Engine& e,
BlockImpl* const tail_block = _tail->parent_block();
BlockImpl* const head_block = _head->parent_block();
+ // Remove tail from head's providers
std::set<BlockImpl*>::iterator hp = head_block->providers().find(tail_block);
if (hp != head_block->providers().end()) {
head_block->providers().erase(hp);
}
+ // Remove head from tail's providers
std::set<BlockImpl*>::iterator td = tail_block->dependants().find(head_block);
if (td != tail_block->dependants().end()) {
tail_block->dependants().erase(td);
@@ -173,8 +175,7 @@ Disconnect::pre_process()
bool
Disconnect::Impl::execute(ProcessContext& context, bool set_head_buffers)
{
- ArcImpl* const port_arc =
- _head->remove_arc(context, _tail);
+ ArcImpl* const port_arc = _head->remove_arc(context, _tail);
if (!port_arc) {
return false;