diff options
-rw-r--r-- | proto-udp/ftnoir_protocol_ftn.cpp | 7 | ||||
-rw-r--r-- | tracker-udp/ftnoir_tracker_udp.cpp | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/proto-udp/ftnoir_protocol_ftn.cpp b/proto-udp/ftnoir_protocol_ftn.cpp index a4a924b1..4e846114 100644 --- a/proto-udp/ftnoir_protocol_ftn.cpp +++ b/proto-udp/ftnoir_protocol_ftn.cpp @@ -15,7 +15,10 @@ udp::udp() { set_dest_address(); - QObject::connect(s.b.get(), &bundle_::changed, this, &udp::set_dest_address); + + QObject::connect(s.b.get(), &bundle_::changed, + this, &udp::set_dest_address, + Qt::QueuedConnection); } void udp::pose(const double *headpose) { @@ -33,7 +36,7 @@ void udp::set_dest_address() module_status udp::initialize() { - if (outSocket.bind(QHostAddress::Any, 0, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint)) + if (outSocket.bind(QHostAddress::Any, 0, QUdpSocket::DontShareAddress)) return status_ok(); else return error(tr("Can't bind socket: %1").arg(outSocket.errorString())); diff --git a/tracker-udp/ftnoir_tracker_udp.cpp b/tracker-udp/ftnoir_tracker_udp.cpp index f147e5c6..fd627ae1 100644 --- a/tracker-udp/ftnoir_tracker_udp.cpp +++ b/tracker-udp/ftnoir_tracker_udp.cpp @@ -67,7 +67,7 @@ void udp::run() module_status udp::start_tracker(QFrame*) { - if (!sock.bind(QHostAddress::Any, quint16(s.port), QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint)) + if (!sock.bind(QHostAddress::Any, quint16(s.port), QUdpSocket::DontShareAddress)) return error(tr("Can't bind socket -- %1").arg(sock.errorString())); sock.moveToThread(this); |