diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-01-16 05:58:48 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-01-16 07:49:13 +0100 |
commit | 03d28dde1635e36508cff1f9eabc265cdb5febb9 (patch) | |
tree | ee62d5851315c7b4c2c3c05f8a72e29a6dd4a1e8 /proto-udp/ftnoir_protocol_ftn.cpp | |
parent | f8faca0abecafd6e65d07bd0fdd618070114cdfa (diff) |
compat/mutex: remove
Always use the adaptive QMutex.
Diffstat (limited to 'proto-udp/ftnoir_protocol_ftn.cpp')
-rw-r--r-- | proto-udp/ftnoir_protocol_ftn.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/proto-udp/ftnoir_protocol_ftn.cpp b/proto-udp/ftnoir_protocol_ftn.cpp index def3ebb1..000a0a79 100644 --- a/proto-udp/ftnoir_protocol_ftn.cpp +++ b/proto-udp/ftnoir_protocol_ftn.cpp @@ -21,15 +21,16 @@ udp::udp() Qt::DirectConnection); } -void udp::pose(const double *headpose) { - spinlock_guard l(spl); +void udp::pose(const double *headpose) +{ + QMutexLocker l(&lock); outSocket.writeDatagram((const char *) headpose, sizeof(double[6]), dest_ip, dest_port); } void udp::set_dest_address() { - spinlock_guard l(spl); + QMutexLocker l(&lock); dest_port = (unsigned short)s.port; dest_ip = QHostAddress((s.ip1.to<unsigned>() & 0xff) << 24 | |