summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp3
-rw-r--r--ftnoir_tracker_udp/ftnoir_tracker_udp.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp
index e92c9eec..540ef616 100644
--- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp
+++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp
@@ -37,6 +37,8 @@ void TrackerImpl::run() {
flag_Orient = 1 << 1,
Mask = flag_Raw | flag_Orient
};
+
+ (void) sock.bind(QHostAddress::Any, (int) s.port, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint);
while (!should_quit) {
int order[] = {
@@ -101,7 +103,6 @@ void TrackerImpl::run() {
void TrackerImpl::start_tracker(QFrame*)
{
- (void) sock.bind(QHostAddress::Any, (int) s.port, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint);
start();
}
diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp
index 507543be..c900fb67 100644
--- a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp
+++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp
@@ -12,6 +12,7 @@ FTNoIR_Tracker::~FTNoIR_Tracker()
void FTNoIR_Tracker::run() {
QByteArray datagram;
datagram.resize(sizeof(last_recv_pose));
+ (void) sock.bind(QHostAddress::Any, (int) s.port, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint);
for (;;) {
if (should_quit)
break;
@@ -25,7 +26,6 @@ void FTNoIR_Tracker::run() {
void FTNoIR_Tracker::start_tracker(QFrame*)
{
- (void) sock.bind(QHostAddress::Any, (int) s.port, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint);
start();
}