More linux compile fixes after code tidy.

merge-requests/1/head
Phil Taylor 2021-02-04 20:20:23 +00:00
rodzic d172b2ec75
commit ea1537a006
2 zmienionych plików z 7 dodań i 6 usunięć

Wyświetl plik

@ -24,7 +24,7 @@ udpHandler::udpHandler(QHostAddress ip, int cport, int sport, int aport,QString
}
}
udpBase::udpBase(); // Perform connection
init(); // Perform connection
QUdpSocket::connect(udp, &QUdpSocket::readyRead, this, &udpHandler::DataReceived);
connect(&reauthTimer, &QTimer::timeout, this, QOverload<>::of(&udpHandler::ReAuth));
@ -325,7 +325,7 @@ udpSerial::udpSerial(QHostAddress local, QHostAddress ip, int sport) {
port = sport;
radioIP = ip;
udpBase::udpBase(); // Perform connection
init(); // Perform connection
QUdpSocket::connect(udp, &QUdpSocket::readyRead, this, &udpSerial::DataReceived);
SendPacketConnect(); // First connect packet
@ -452,7 +452,7 @@ udpAudio::udpAudio(QHostAddress local, QHostAddress ip, int aport)
port = aport;
radioIP = ip;
udpBase::udpBase(); // Perform connection
init(); // Perform connection
QUdpSocket::connect(udp, &QUdpSocket::readyRead, this, &udpAudio::DataReceived);
SendPacketConnect(); // First connect packet
@ -546,7 +546,8 @@ void udpAudio::DataReceived()
}
udpBase::udpBase()
void udpBase::init()
{
udp = new QUdpSocket(this);
udp->bind(); // Bind to random port.
@ -555,7 +556,6 @@ udpBase::udpBase()
uint32_t addr = localIP.toIPv4Address();
localSID = (addr >> 8 & 0xff) << 24 | (addr & 0xff) << 16 | (localPort & 0xffff);
}
udpBase::~udpBase()
{
qDebug() << "Closing UDP stream :" << radioIP.toString() << ":" << port;

Wyświetl plik

@ -23,9 +23,10 @@ class udpBase : public QObject
{
public:
udpBase();
~udpBase();
void init();
qint64 SendTrackedPacket(QByteArray d);
qint64 SendPacketConnect();
qint64 SendPacketConnect2();