Swap source and dest call when extracting calls from YSF DCH header (CSD1).

According to table 4-2 of the spec, CSD1 starts with the 10 byte destination
call and ends with the 10 byte source call. The code had it the other way
round.
This commit is contained in:
Mathias Weyland 2016-05-03 23:22:13 +02:00
parent 8e8f83afee
commit c840090341

View file

@ -136,17 +136,17 @@ bool CYSFPayload::processHeaderData(unsigned char* data)
for (unsigned int i = 0U; i < 20U; i++)
output[i] ^= WHITENING_DATA[i];
CUtils::dump(1U, "Header, Source", output + 0U, 10U);
CUtils::dump(1U, "Header, Destination", output + 10U, 10U);
if (m_source == NULL) {
m_source = new unsigned char[10U];
::memcpy(m_source, output + 0U, 10U);
}
CUtils::dump(1U, "Header, Destination", output + 0U, 10U);
CUtils::dump(1U, "Header, Source", output + 10U, 10U);
if (m_dest == NULL) {
m_dest = new unsigned char[10U];
::memcpy(m_dest, output + 10U, 10U);
::memcpy(m_dest, output + 0U, 10U);
}
if (m_source == NULL) {
m_source = new unsigned char[10U];
::memcpy(m_source, output + 10U, 10U);
}
for (unsigned int i = 0U; i < 20U; i++)