Commit graph

162 commits

Author SHA1 Message Date
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
Jonathan Naylor
5cf7887c18 Update README.md 2026-02-14 18:19:54 +00:00
Jonathan Naylor
1cb140bc29 Merge branch 'master' into mqtt 2026-02-14 16:39:05 +00:00
Jonathan Naylor
475c8023ec
Merge pull request #37 from MW0MWZ/patch-1
Update Conf.cpp
2025-08-20 17:26:56 +01:00
MW0MWZ
e139bde022
Update Conf.cpp
Fix a compile failure
2025-08-20 12:25:14 +01:00
Jonathan Naylor
b06e6b088b
Merge pull request #36 from f1rmb/f1rmb_handle_statics_with_remote_command
Fix nullptr instead of NULL argument usage in getaddrinfo().
2025-06-09 13:51:18 +01:00
Daniel Caujolle-Bert
3cb2f646b0 Fix nullptr instead of NULL argument usage in getaddrinfo().
Bump version.
2025-06-07 19:42:38 +02:00
Jonathan Naylor
d1bd0b549a Add MQTT authentication. 2025-03-26 15:11:42 +00:00
Jonathan Naylor
3aee1f0ed8 Merge branch 'master' into mqtt 2025-03-18 15:13:07 +00:00
Jonathan Naylor
dde4c01a45 Upgrade the C++ version. 2025-03-18 13:52:17 +00:00
Jonathan Naylor
2a13d8b4d1 Merge branch 'master' into mqtt 2024-08-31 20:10:29 +01:00
Jonathan Naylor
8c6fa22730 Fix signal logging. 2024-08-31 20:10:13 +01:00
Jonathan Naylor
496c22f4c2 Merge branch 'master' into mqtt 2024-08-28 17:54:53 +01:00
Jonathan Naylor
bcd41d0ab6 Improve the signal handling. 2024-08-28 17:50:50 +01:00
Jonathan Naylor
bb3463b14c Add the gitversion to the Makefile. 2024-04-22 14:06:52 +01:00
Jonathan Naylor
bbc1a30c5d Allow to buildon Windows again. 2024-04-22 13:49:26 +01:00
Jonathan Naylor
98aa2e877d Merge branch 'master' into mqtt 2024-01-29 16:38:39 +00:00
Jonathan Naylor
41ba7fb13b Simplify the UDP socket handling. 2024-01-29 16:37:34 +00:00
Jonathan Naylor
c28edb9c4f Bump the version date. 2023-07-11 17:10:41 +01:00
Jonathan Naylor
0eda05e064 Exit the main loop correctly. 2023-07-11 13:43:13 +01:00
Jonathan Naylor
97db2e9b45 Add basic JSON logging. 2023-07-11 11:25:39 +01:00
Jonathan Naylor
f0a271ae53 Upgrade the version and signal handling. 2023-07-07 18:41:30 +01:00
Jonathan Naylor
e677d6a954 Convert the gateway to log via MQTT. 2023-07-07 17:57:36 +01:00
Jonathan Naylor
631297ece7 Update the README 2021-12-13 10:25:03 +00:00
Jonathan Naylor
f8df3f24ad Fix compiler warning 2021-10-25 17:59:49 +01:00
Jonathan Naylor
4a09d04200
Merge pull request #34 from f1rmb/f1rmb_network_port_datatype
Fix network ports datatype (unsigned int -> unsigned short). UDPSocket: fix old bug using m_port instead of m_port[x].
2021-04-25 09:38:48 +01:00
Daniel Caujolle-Bert
310cf0c8ff
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
Jonathan Naylor
183615d52e
Merge pull request #33 from f1rmb/f1rmb_fix_UDPSocket_close
Fix nasty bug in UDPSocket::close().
2021-04-08 18:18:19 +01:00
Daniel Caujolle-Bert
7311d5aa6b
Fix nasty bug in UDPSocket::close(). 2021-03-31 16:18:24 +02:00
Jonathan Naylor
8893f25cdb Add optional log file rotation and UDP error handling. 2020-10-31 22:16:07 +00:00
Jonathan Naylor
2f62c51624 Merge branch 'master' into IPv6 2020-10-07 11:27:53 +01:00
Jonathan Naylor
b012b9ce96 Fix buffer overflow. 2020-10-07 11:27:25 +01:00
Jonathan Naylor
ce586e9672 Merge branch 'master' into IPv6 2020-10-05 13:27:30 +01:00
Jonathan Naylor
701bdd3272 Updates for NetBSD. 2020-10-05 13:27:06 +01:00
Jonathan Naylor
6b035c6f48 Merge branch 'IPv6' of https://github.com/g4klx/DAPNETGateway into IPv6 2020-10-05 13:23:05 +01:00
Jonathan Naylor
5caf8c9e4b Updates for NetBSD. 2020-10-05 13:22:45 +01:00
Jonathan Naylor
0c328b96fa Use normal logging. 2020-09-29 12:33:12 +01:00
Jonathan Naylor
52b49f0bf4 Make Windows run. 2020-09-20 21:54:32 +01:00
Jonathan Naylor
2bec26d77c Fix Windows compilation. 2020-09-20 15:55:37 +01:00
Jonathan Naylor
471f5475d2 Improva the ini file parsing. 2020-09-06 14:20:00 +01:00
Jonathan Naylor
3347a42118 IPv6 updates. 2020-09-06 14:06:13 +01:00
Jonathan Naylor
623d7a4be2 Merge branch 'master' into IPv6 2020-09-03 11:24:26 +01:00
Florian (DF2ET)
f00807f4ee
Merge pull request #30 from dg9vh/patch-1
Changed Login-banner to correct program-name
2020-08-13 20:03:19 +02:00
Kim - DG9VH
8f31defe56
Changed Login-banner to correct program-name
Thinking, DAPNETGateway would be more clearer than MMDVM, because it is not MMDVM doing the connection but DAPNETGateway
2020-08-13 20:01:54 +02:00
Jonathan Naylor
87aea190bf Add the install target. 2020-06-25 09:59:31 +01:00
Jonathan Naylor
140e1fd6e8
Merge pull request #29 from jg1uaa/master
renew UDPSocket.cpp
2020-06-11 22:05:29 +01:00
SASANO Takayoshi
35d3aecf85 modified for new UDPSocket.cpp 2020-04-07 18:01:58 +09:00
SASANO Takayoshi
85d02c8cf2 sync to MMDVMHost-ipv6 code 2020-04-07 18:01:58 +09:00
Jonathan Naylor
adee6bb5fa Update to VS2019. 2020-02-14 21:53:25 +00:00
Florian (DF2ET)
a0e947a405
Merge pull request #28 from jg1uaa/master
fix bug that open() does not support IPv6 socket
2019-10-25 23:51:42 +02:00