use CClient::GetReflectorModule

unstable
Tom Early 4 years ago
parent 92a7612e2f
commit af9a5d9592

@ -86,7 +86,8 @@ CDvHeaderPacket::CDvHeaderPacket(const CM17Packet &m17) : CPacket(m17)
m_uiFlag1 = m_uiFlag2 = m_uiFlag3 = 0; m_uiFlag1 = m_uiFlag2 = m_uiFlag3 = 0;
m_uiCrc = 0; m_uiCrc = 0;
m_csUR = CCallsign("CQCQCQ"); m_csUR = CCallsign("CQCQCQ");
m_csMY = m_csRPT1 = m_csRPT2 = m17.GetSourceCallsign(); m_csMY = m17.GetSourceCallsign();
m_csRPT1 = m_csRPT2 = m17.GetDestCallsign();
m_csRPT1.SetCSModule('G'); m_csRPT1.SetCSModule('G');
} }

@ -134,7 +134,7 @@ void CProtocol::OnDvFramePacketIn(std::unique_ptr<CDvFramePacket> &Frame, const
if ( stream ) if ( stream )
{ {
// set the packet module, the transcoder needs this // set the packet module, the transcoder needs this
Frame->SetPacketModule(stream->GetRpt2Module()); Frame->SetPacketModule(stream->GetOwnerClient()->GetReflectorModule());
// and push // and push
stream->Lock(); stream->Lock();
stream->Push(std::move(Frame)); stream->Push(std::move(Frame));

@ -181,9 +181,10 @@ std::shared_ptr<CPacketStream> CReflector::OpenStream(std::unique_ptr<CDvHeaderP
return nullptr; return nullptr;
} }
// set the packet module
DvHeader->SetPacketModule(client->GetReflectorModule());
// get the module's queue // get the module's queue
char module = DvHeader->GetRpt2Module(); char module = DvHeader->GetRpt2Module();
DvHeader->SetPacketModule(module);
auto stream = GetStream(module); auto stream = GetStream(module);
if ( stream == nullptr ) if ( stream == nullptr )
{ {

Loading…
Cancel
Save

Powered by TurnKey Linux.