From 96887307c59ac7d6b2c3ed40684cd40ae3a0d936 Mon Sep 17 00:00:00 2001 From: Mateusz Daniluk <121170681+VeithMetro@users.noreply.github.com> Date: Wed, 23 Oct 2024 13:13:00 +0200 Subject: [PATCH] Add an implementation of UpdateChannel --- MessageControl/MessageOutput.cpp | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/MessageControl/MessageOutput.cpp b/MessageControl/MessageOutput.cpp index 932a241..bd6d14e 100644 --- a/MessageControl/MessageOutput.cpp +++ b/MessageControl/MessageOutput.cpp @@ -177,23 +177,18 @@ namespace Publishers { } } - PluginHost::ISubSystem* UDPOutput::SubSystem() const + void UDPOutput::UpdateChannel() { - return (_subSystem); - } - - void UDPOutput::OpenUDPOutputChannel() - { - if (_output.IsOpen() == false) { - _output.Open(0); + if (_subSystem->IsActive(PluginHost::ISubSystem::NETWORK)) { + if (_output.IsOpen() == false) { + _output.Open(0); + } + ASSERT(_output.IsOpen() == true); } - ASSERT(_output.IsOpen() == true); - } - - void UDPOutput::CloseUDPOutputChannel() - { - if (_output.IsOpen() == true) { - _output.Close(Core::infinite); + else { + if (_output.IsOpen() == true) { + _output.Close(Core::infinite); + } } }