Skip to content

Commit

Permalink
Notification: Code tunning
Browse files Browse the repository at this point in the history
  • Loading branch information
foldynl committed Dec 16, 2024
1 parent 751b4ec commit c36484d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 1 addition & 6 deletions core/NetworkNotification.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <QUuid>
#include <QUdpSocket>

#include "NetworkNotification.h"
#include "debug.h"
Expand Down Expand Up @@ -251,17 +250,13 @@ void NetworkNotification::send(const QByteArray &data, const HostsPortString &de

qCDebug(function_parameters) << QString(data);

if ( data.size() <= 0 )
{
if ( data.isEmpty() )
return;
}

const QList<HostPortAddress> &addrList = dests.getAddrList();

for ( const HostPortAddress &addr : addrList )
{
QUdpSocket udpSocket;

qCDebug(runtime) << "Sending to " << addr;
udpSocket.writeDatagram(data, addr, addr.getPort());
}
Expand Down
4 changes: 4 additions & 0 deletions core/NetworkNotification.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <QSqlRecord>
#include <QJsonObject>
#include <QJsonDocument>
#include <QUdpSocket>

#include "core/HostsPortString.h"
#include "logformat/LogFormat.h"
#include "data/DxSpot.h"
Expand Down Expand Up @@ -155,6 +157,8 @@ public slots:

private:

QUdpSocket udpSocket;

void send(const QByteArray &, const HostsPortString &);

static QString CONFIG_NOTIF_QSO_ADI_ADDRS_KEY;
Expand Down

0 comments on commit c36484d

Please sign in to comment.