From 898a7aab91f75c4ceffe6c5a68dba44242ff8cbe Mon Sep 17 00:00:00 2001 From: LordGrey Date: Sun, 5 Jul 2020 11:05:23 +0200 Subject: [PATCH] Fix udpe131 not enabled for generated CID --- libsrc/leddevice/dev_net/LedDeviceUdpE131.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/libsrc/leddevice/dev_net/LedDeviceUdpE131.cpp b/libsrc/leddevice/dev_net/LedDeviceUdpE131.cpp index 0107fe4a8..0f6a972b9 100644 --- a/libsrc/leddevice/dev_net/LedDeviceUdpE131.cpp +++ b/libsrc/leddevice/dev_net/LedDeviceUdpE131.cpp @@ -54,13 +54,21 @@ bool LedDeviceUdpE131::init(const QJsonObject &deviceConfig) if (_json_cid.isEmpty()) { _e131_cid = QUuid::createUuid(); - Debug( _log, "e131 no cid found, generated %s", QSTRING_CSTR(_e131_cid.toString())); + Debug( _log, "e131 no CID found, generated %s", QSTRING_CSTR(_e131_cid.toString())); + isInitOK = true; } else { _e131_cid = QUuid(_json_cid); - Debug( _log, "e131 cid found, using %s", QSTRING_CSTR(_e131_cid.toString())); - isInitOK = true; + if ( !_e131_cid.isNull() ) + { + Debug( _log, "e131 CID found, using %s", QSTRING_CSTR(_e131_cid.toString())); + isInitOK = true; + } + else + { + this->setInError("CID configured is not a valid UUID. Format expected is \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\""); + } } } return isInitOK;