1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 17:28:50 -05:00

Merge pull request #2267 from srcejon/fix_2266

Fix DeviceAPI::deserialize.
This commit is contained in:
Edouard Griffiths 2024-10-07 18:52:11 +02:00 committed by GitHub
commit 6e01114ba8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -550,22 +550,22 @@ bool DeviceAPI::deserialize(const QByteArray& data)
if (m_deviceSourceEngine && m_deviceSourceEngine->getSource()) if (m_deviceSourceEngine && m_deviceSourceEngine->getSource())
{ {
d.readBlob(1, &bdata); d.readBlob(1, &bdata);
if (data.size() > 0) { if (bdata.size() > 0) {
m_deviceSourceEngine->getSource()->deserialize(data); m_deviceSourceEngine->getSource()->deserialize(bdata);
} }
} }
if (m_deviceSinkEngine && m_deviceSinkEngine->getSink()) if (m_deviceSinkEngine && m_deviceSinkEngine->getSink())
{ {
d.readBlob(2, &bdata); d.readBlob(2, &bdata);
if (data.size() > 0) { if (bdata.size() > 0) {
m_deviceSinkEngine->getSink()->deserialize(data); m_deviceSinkEngine->getSink()->deserialize(bdata);
} }
} }
if (m_deviceMIMOEngine && m_deviceMIMOEngine->getMIMO()) if (m_deviceMIMOEngine && m_deviceMIMOEngine->getMIMO())
{ {
d.readBlob(3, &bdata); d.readBlob(3, &bdata);
if (data.size() > 0) { if (bdata.size() > 0) {
m_deviceMIMOEngine->getMIMO()->deserialize(data); m_deviceMIMOEngine->getMIMO()->deserialize(bdata);
} }
} }
d.readList<quint64>(4, &centerFrequency); d.readList<quint64>(4, &centerFrequency);