diff --git a/.github/workflows/Test Thunder.yml b/.github/workflows/Test Thunder.yml index e0bc47040..1e831f9df 100644 --- a/.github/workflows/Test Thunder.yml +++ b/.github/workflows/Test Thunder.yml @@ -17,7 +17,7 @@ on: jobs: Thunder: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: diff --git a/Source/Thunder/PluginServer.h b/Source/Thunder/PluginServer.h index 73cbaf6f0..3f57027a3 100644 --- a/Source/Thunder/PluginServer.h +++ b/Source/Thunder/PluginServer.h @@ -2923,13 +2923,12 @@ namespace PluginHost { if ((original.IsValid() == true) && (_services.find(newCallsign) == _services.end())) { // Copy original configuration - Plugin::Config newConfiguration; - newConfiguration.FromString(original->ConfigLine()); + Plugin::Config newConfiguration(original->Configuration()); newConfiguration.Callsign = newCallsign; Core::ProxyType clone = Core::ProxyType::Create(Configuration(), newConfiguration, *this, Service::mode::CLONED, _engine); - if (newService.IsValid() == true) { + if (clone.IsValid() == true) { // Fire up the interface. Let it handle the messages. _services.emplace( std::piecewise_construct, diff --git a/Source/core/JSON.h b/Source/core/JSON.h index 7031a8594..977f1a257 100644 --- a/Source/core/JSON.h +++ b/Source/core/JSON.h @@ -532,6 +532,15 @@ namespace Core { return (*this); } + NumberType& operator=(const Core::OptionalType& RHS) + { + if (RHS.IsSet() == true) { + operator=(RHS.Value()); + } + + return (*this); + } + inline TYPE Default() const { return _default; @@ -1054,6 +1063,15 @@ namespace Core { return (*this); } + FloatType& operator=(const Core::OptionalType& RHS) + { + if (RHS.IsSet() == true) { + operator=(RHS.Value()); + } + + return (*this); + } + inline TYPE Default() const { return _default; @@ -1347,6 +1365,15 @@ namespace Core { return (*this); } + Boolean& operator=(const Core::OptionalType& RHS) + { + if (RHS.IsSet() == true) { + operator=(RHS.Value()); + } + + return (*this); + } + inline bool Value() const { return ((_value & SetBit) != 0 ? (_value & ValueBit) != 0 : (_value & DefaultBit) != 0); @@ -1582,6 +1609,15 @@ namespace Core { return (*this); } + String& operator=(const Core::OptionalType& RHS) + { + if (RHS.IsSet() == true) { + operator=(RHS.Value()); + } + + return (*this); + } + String& operator=(const char RHS[]) { Core::ToString(RHS, _value); @@ -2630,6 +2666,15 @@ namespace Core { return (*this); } + EnumType& operator=(const Core::OptionalType& RHS) + { + if (RHS.IsSet() == true) { + operator=(RHS.Value()); + } + + return (*this); + } + inline const ENUMERATE Default() const { return (_default); @@ -3243,6 +3288,16 @@ namespace Core { return (*this); } + template + ArrayType& operator=(const Core::OptionalType& RHS) + { + if (RHS.IsSet() == true) { + operator=(RHS.Value()); + } + + return (*this); + } + template>::value, int>::type = 0> inline operator const ENUM() const { diff --git a/Source/websocket/WebSocketLink.h b/Source/websocket/WebSocketLink.h index 728cf73ec..81b787c3e 100644 --- a/Source/websocket/WebSocketLink.h +++ b/Source/websocket/WebSocketLink.h @@ -646,7 +646,9 @@ POP_WARNING() result += static_cast(headerSize + payloadSizeInControlFrame); // actualDataSize } else { - _parent.ReceiveData(&(dataFrame[result + headerSize]), actualDataSize); + if (actualDataSize != 0) { + _parent.ReceiveData(&(dataFrame[result + headerSize]), actualDataSize); + } result += (headerSize + actualDataSize); }