mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Merge pull request #578 from Paulchen-Panther/api_auth
Token Management, Database, ...
This commit is contained in:
@@ -10,8 +10,6 @@
|
||||
#include "hyperion/Hyperion.h"
|
||||
#include <utils/JsonUtils.h>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
LedDevice::LedDevice(const QJsonObject& config, QObject* parent)
|
||||
: QObject(parent)
|
||||
, _devConfig(config)
|
||||
|
@@ -53,7 +53,7 @@ bool ProviderUdp::init(const QJsonObject &deviceConfig)
|
||||
}
|
||||
|
||||
_port = deviceConfig["port"].toInt(_port);
|
||||
if ( (_port <= 0) || (_port > 65535) )
|
||||
if ( (_port <= 0) || (_port > MAX_PORT) )
|
||||
{
|
||||
throw std::runtime_error("invalid target port");
|
||||
}
|
||||
|
@@ -9,6 +9,8 @@
|
||||
|
||||
class QUdpSocket;
|
||||
|
||||
#define MAX_PORT 65535
|
||||
|
||||
///
|
||||
/// The ProviderUdp implements an abstract base-class for LedDevices using UDP packets.
|
||||
///
|
||||
@@ -54,6 +56,6 @@ protected:
|
||||
///
|
||||
QUdpSocket * _udpSocket;
|
||||
QHostAddress _address;
|
||||
quint16 _port;
|
||||
ushort _port;
|
||||
QString _defaultHost;
|
||||
};
|
||||
|
Reference in New Issue
Block a user