mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-29 06:25:41 +08:00
Merge branch 'master' into mqtt
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2009-2014,2016,2019,2020,2021,2023,2024 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2009-2014,2016,2019,2020,2021,2023,2024,2025 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -45,8 +45,8 @@ m_outSeq(0U),
|
||||
m_inId(0U),
|
||||
m_buffer(1000U, "D-Star Network"),
|
||||
m_pollTimer(1000U, 60U),
|
||||
m_linkStatus(LS_NONE),
|
||||
m_linkReflector(NULL),
|
||||
m_linkStatus(LINK_STATUS::NONE),
|
||||
m_linkReflector(nullptr),
|
||||
m_random()
|
||||
{
|
||||
if (CUDPSocket::lookup(gatewayAddress, gatewayPort, m_addr, m_addrLen) != 0)
|
||||
@@ -81,7 +81,7 @@ bool CDStarNetwork::open()
|
||||
|
||||
bool CDStarNetwork::writeHeader(const unsigned char* header, unsigned int length, bool busy)
|
||||
{
|
||||
assert(header != NULL);
|
||||
assert(header != nullptr);
|
||||
|
||||
unsigned char buffer[50U];
|
||||
|
||||
@@ -119,7 +119,7 @@ bool CDStarNetwork::writeHeader(const unsigned char* header, unsigned int length
|
||||
|
||||
bool CDStarNetwork::writeData(const unsigned char* data, unsigned int length, unsigned int errors, bool end, bool busy)
|
||||
{
|
||||
assert(data != NULL);
|
||||
assert(data != nullptr);
|
||||
|
||||
unsigned char buffer[30U];
|
||||
|
||||
@@ -157,7 +157,7 @@ bool CDStarNetwork::writeData(const unsigned char* data, unsigned int length, un
|
||||
|
||||
bool CDStarNetwork::writePoll(const char* text)
|
||||
{
|
||||
assert(text != NULL);
|
||||
assert(text != nullptr);
|
||||
|
||||
unsigned char buffer[40U];
|
||||
|
||||
@@ -168,7 +168,7 @@ bool CDStarNetwork::writePoll(const char* text)
|
||||
|
||||
buffer[4] = 0x0AU; // Poll with text
|
||||
|
||||
unsigned int length = ::strlen(text);
|
||||
unsigned int length = (unsigned int)::strlen(text);
|
||||
|
||||
// Include the nul at the end also
|
||||
::memcpy(buffer + 5U, text, length + 1U);
|
||||
@@ -287,7 +287,7 @@ void CDStarNetwork::clock(unsigned int ms)
|
||||
|
||||
unsigned int CDStarNetwork::read(unsigned char* data, unsigned int length)
|
||||
{
|
||||
assert(data != NULL);
|
||||
assert(data != nullptr);
|
||||
|
||||
if (m_buffer.isEmpty())
|
||||
return 0U;
|
||||
@@ -342,7 +342,7 @@ void CDStarNetwork::enable(bool enabled)
|
||||
|
||||
void CDStarNetwork::getStatus(LINK_STATUS& status, unsigned char* reflector)
|
||||
{
|
||||
assert(reflector != NULL);
|
||||
assert(reflector != nullptr);
|
||||
|
||||
status = m_linkStatus;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user