Clean up of processing.

This commit is contained in:
Jonathan Naylor
2016-09-22 20:31:25 +01:00
parent 55a34bc995
commit 98ab0845f3
5 changed files with 52 additions and 64 deletions

View File

@@ -64,7 +64,7 @@ bool CP25Network::open()
return m_socket.open();
}
bool CP25Network::writeHeader(unsigned int tgid)
bool CP25Network::writeHeader(const CP25Data& control)
{
if (m_debug)
CUtils::dump(1U, "P25 Network ICW Sent", STARTICW, 10U);
@@ -84,6 +84,11 @@ bool CP25Network::writeHeader(unsigned int tgid)
return false;
#endif
unsigned int tgid = 0x0000U;
if (control.getLCF() == P25_LCF_GROUP)
tgid = control.getDstId();
// The VHDR2 record
unsigned char buffer[22U];
::memset(buffer, 0x00U, 22U);