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:
parent
8e8f83afee
commit
c840090341
1 changed files with 8 additions and 8 deletions
|
@ -136,17 +136,17 @@ bool CYSFPayload::processHeaderData(unsigned char* data)
|
||||||
for (unsigned int i = 0U; i < 20U; i++)
|
for (unsigned int i = 0U; i < 20U; i++)
|
||||||
output[i] ^= WHITENING_DATA[i];
|
output[i] ^= WHITENING_DATA[i];
|
||||||
|
|
||||||
CUtils::dump(1U, "Header, Source", output + 0U, 10U);
|
CUtils::dump(1U, "Header, Destination", output + 0U, 10U);
|
||||||
CUtils::dump(1U, "Header, Destination", output + 10U, 10U);
|
CUtils::dump(1U, "Header, Source", output + 10U, 10U);
|
||||||
|
|
||||||
if (m_source == NULL) {
|
|
||||||
m_source = new unsigned char[10U];
|
|
||||||
::memcpy(m_source, output + 0U, 10U);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_dest == NULL) {
|
if (m_dest == NULL) {
|
||||||
m_dest = new unsigned char[10U];
|
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++)
|
for (unsigned int i = 0U; i < 20U; i++)
|
||||||
|
|
Loading…
Reference in a new issue