1
0
mirror of https://github.com/ShaYmez/xlxd.git synced 2025-06-15 03:52:26 -04:00

Fix missing first frame from outgoing DCS stream

As every DCS data packet has both the D-STAR header info and DV data in it,
we must process DV data for all DCS data packets, including the first packet
of a stream.
This commit is contained in:
Nonoo 2016-10-18 12:20:20 +02:00
parent 253ab1322e
commit fd000596e7

View File

@ -94,23 +94,17 @@ void CDcsProtocol::Task(void)
if ( g_GateKeeper.MayTransmit(Header->GetMyCallsign(), Ip, PROTOCOL_DCS, Header->GetRpt2Module()) )
{
// handle it
if ( !OnDvHeaderPacketIn(Header, Ip) )
OnDvHeaderPacketIn(Header, Ip);
if ( !Frame->IsLastPacket() )
{
if ( !Frame->IsLastPacket() )
{
//std::cout << "DCS DV frame" << std::endl;
OnDvFramePacketIn(Frame);
}
else
{
//std::cout << "DCS DV last frame" << std::endl;
OnDvLastFramePacketIn((CDvLastFramePacket *)Frame);
}
//std::cout << "DCS DV frame" << std::endl;
OnDvFramePacketIn(Frame);
}
else
{
//std::cout << "DCS DV header:" << std::endl << *Header << std::endl;
delete Frame;
//std::cout << "DCS DV last frame" << std::endl;
OnDvLastFramePacketIn((CDvLastFramePacket *)Frame);
}
}
else