No description
Find a file
Andy Taylor 3b99af8afc Fix MQTT client ID collision on ARM 32-bit userland with 64-bit kernel
The MQTT client ID was generated using sprintf with %ld and time(nullptr).
On platforms with 32-bit userland but 64-bit kernel (such as Raspberry Pi OS
and some custom Alpine Linux builds), time_t is a 64-bit long long but %ld
only reads 32 bits. Since the upper 32 bits of the current Unix timestamp
are zero, this always produces a client ID ending in .0, causing collisions
when multiple instances or restarts occur.

Replace time()-based client IDs with PID-based IDs using getpid(), which is
always a portable 32-bit value and unique per process. Platform-guarded for
Windows (_getpid) and POSIX (getpid).
2026-03-08 12:51:35 +00:00
.gitignore Merge branch 'master' into mqtt 2024-01-29 16:38:39 +00:00
Conf.cpp Merge branch 'master' into mqtt 2026-02-14 16:39:05 +00:00
Conf.h Add MQTT authentication. 2025-03-26 15:11:42 +00:00
DAPNETGateway.cpp Add MQTT authentication. 2025-03-26 15:11:42 +00:00
DAPNETGateway.h Add basic JSON logging. 2023-07-11 11:25:39 +01:00
DAPNETGateway.ini Add MQTT authentication. 2025-03-26 15:11:42 +00:00
DAPNETGateway.sln Initial commit. 2018-06-06 20:33:31 +01:00
DAPNETGateway.vcxproj Merge branch 'master' into mqtt 2026-02-14 16:39:05 +00:00
DAPNETGateway.vcxproj.filters Merge branch 'master' into mqtt 2025-03-18 15:13:07 +00:00
DAPNETNetwork.cpp Upgrade the C++ version. 2025-03-18 13:52:17 +00:00
DAPNETNetwork.h Fix network ports datatype (unsigned int -> unsigned short). UDPSocket: fix old bug using m_port instead of m_port[x]. 2021-04-25 07:43:56 +02:00
LICENCE Initial commit. 2018-06-06 20:33:31 +01:00
Log.cpp Merge branch 'master' into mqtt 2025-03-18 15:13:07 +00:00
Log.h Convert the gateway to log via MQTT. 2023-07-07 17:57:36 +01:00
Makefile Merge branch 'master' into mqtt 2024-08-28 17:54:53 +01:00
MQTTConnection.cpp Fix MQTT client ID collision on ARM 32-bit userland with 64-bit kernel 2026-03-08 12:51:35 +00:00
MQTTConnection.h Add MQTT authentication. 2025-03-26 15:11:42 +00:00
POCSAGMessage.cpp Upgrade the C++ version. 2025-03-18 13:52:17 +00:00
POCSAGMessage.h Hopefully fix queue stalls. 2018-06-25 19:11:33 +01:00
POCSAGNetwork.cpp Upgrade the C++ version. 2025-03-18 13:52:17 +00:00
POCSAGNetwork.h Fix network ports datatype (unsigned int -> unsigned short). UDPSocket: fix old bug using m_port instead of m_port[x]. 2021-04-25 07:43:56 +02:00
prebuild.cmd Allow to buildon Windows again. 2024-04-22 13:49:26 +01:00
README.md Update README.md 2026-02-14 18:19:54 +00:00
README.REGEX Add config options for REGEX support. Also add README.REGEX 2018-11-17 16:37:11 +00:00
REGEX.cpp Upgrade the C++ version. 2025-03-18 13:52:17 +00:00
REGEX.h Some minor code beautification 2018-11-18 23:35:06 +01:00
schema.json Add basic JSON logging. 2023-07-11 11:25:39 +01:00
StopWatch.cpp Upgrade the C++ version. 2025-03-18 13:52:17 +00:00
StopWatch.h Fix Windows compilation. 2020-09-20 15:55:37 +01:00
TCPSocket.cpp Merge branch 'master' into mqtt 2025-03-18 15:13:07 +00:00
TCPSocket.h Upgrade the C++ version. 2025-03-18 13:52:17 +00:00
Thread.cpp Upgrade the C++ version. 2025-03-18 13:52:17 +00:00
Thread.h Initial commit. 2018-06-06 20:33:31 +01:00
Timer.cpp Initial commit. 2018-06-06 20:33:31 +01:00
Timer.h Initial commit. 2018-06-06 20:33:31 +01:00
UDPSocket.cpp Fix nullptr instead of NULL argument usage in getaddrinfo(). 2025-06-07 19:42:38 +02:00
UDPSocket.h Upgrade the C++ version. 2025-03-18 13:52:17 +00:00
Utils.cpp Merge branch 'master' into mqtt 2025-03-18 15:13:07 +00:00
Utils.h Add basic JSON logging. 2023-07-11 11:25:39 +01:00
Version.h Merge branch 'master' into mqtt 2026-02-14 16:39:05 +00:00

The DAPNET Gateway links the MMDVM Host to the DAPNET network to receive paging messages.

The messages are buffered by the gateway when the host is busy with other modes, and then sends them to the host in order once the host becomes idle.

They build on 32-bit and 64-bit Linux as well as on Windows using Visual Studio 2022 on x86 and x64.

This software is licenced under the GPL v2 and is primarily intended for amateur and educational use.