kopia lustrzana https://gitlab.com/eliggett/wfview
More linux compile fixes after code tidy.
rodzic
d172b2ec75
commit
ea1537a006
|
@ -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);
|
QUdpSocket::connect(udp, &QUdpSocket::readyRead, this, &udpHandler::DataReceived);
|
||||||
|
|
||||||
connect(&reauthTimer, &QTimer::timeout, this, QOverload<>::of(&udpHandler::ReAuth));
|
connect(&reauthTimer, &QTimer::timeout, this, QOverload<>::of(&udpHandler::ReAuth));
|
||||||
|
@ -325,7 +325,7 @@ udpSerial::udpSerial(QHostAddress local, QHostAddress ip, int sport) {
|
||||||
port = sport;
|
port = sport;
|
||||||
radioIP = ip;
|
radioIP = ip;
|
||||||
|
|
||||||
udpBase::udpBase(); // Perform connection
|
init(); // Perform connection
|
||||||
|
|
||||||
QUdpSocket::connect(udp, &QUdpSocket::readyRead, this, &udpSerial::DataReceived);
|
QUdpSocket::connect(udp, &QUdpSocket::readyRead, this, &udpSerial::DataReceived);
|
||||||
SendPacketConnect(); // First connect packet
|
SendPacketConnect(); // First connect packet
|
||||||
|
@ -452,7 +452,7 @@ udpAudio::udpAudio(QHostAddress local, QHostAddress ip, int aport)
|
||||||
port = aport;
|
port = aport;
|
||||||
radioIP = ip;
|
radioIP = ip;
|
||||||
|
|
||||||
udpBase::udpBase(); // Perform connection
|
init(); // Perform connection
|
||||||
|
|
||||||
QUdpSocket::connect(udp, &QUdpSocket::readyRead, this, &udpAudio::DataReceived);
|
QUdpSocket::connect(udp, &QUdpSocket::readyRead, this, &udpAudio::DataReceived);
|
||||||
SendPacketConnect(); // First connect packet
|
SendPacketConnect(); // First connect packet
|
||||||
|
@ -546,7 +546,8 @@ void udpAudio::DataReceived()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
udpBase::udpBase()
|
|
||||||
|
void udpBase::init()
|
||||||
{
|
{
|
||||||
udp = new QUdpSocket(this);
|
udp = new QUdpSocket(this);
|
||||||
udp->bind(); // Bind to random port.
|
udp->bind(); // Bind to random port.
|
||||||
|
@ -555,7 +556,6 @@ udpBase::udpBase()
|
||||||
uint32_t addr = localIP.toIPv4Address();
|
uint32_t addr = localIP.toIPv4Address();
|
||||||
localSID = (addr >> 8 & 0xff) << 24 | (addr & 0xff) << 16 | (localPort & 0xffff);
|
localSID = (addr >> 8 & 0xff) << 24 | (addr & 0xff) << 16 | (localPort & 0xffff);
|
||||||
}
|
}
|
||||||
|
|
||||||
udpBase::~udpBase()
|
udpBase::~udpBase()
|
||||||
{
|
{
|
||||||
qDebug() << "Closing UDP stream :" << radioIP.toString() << ":" << port;
|
qDebug() << "Closing UDP stream :" << radioIP.toString() << ":" << port;
|
||||||
|
|
|
@ -23,9 +23,10 @@ class udpBase : public QObject
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
udpBase();
|
|
||||||
~udpBase();
|
~udpBase();
|
||||||
|
|
||||||
|
void init();
|
||||||
|
|
||||||
qint64 SendTrackedPacket(QByteArray d);
|
qint64 SendTrackedPacket(QByteArray d);
|
||||||
qint64 SendPacketConnect();
|
qint64 SendPacketConnect();
|
||||||
qint64 SendPacketConnect2();
|
qint64 SendPacketConnect2();
|
||||||
|
|
Ładowanie…
Reference in New Issue