mirror of
https://github.com/LX3JL/xlxd.git
synced 2026-01-07 09:10:43 +01:00
Merge branch 'master' of https://github.com/jg1uaa/xlxd into master
This commit is contained in:
commit
6ddbe1f818
4
src/cg3protocol.cpp
Normal file → Executable file
4
src/cg3protocol.cpp
Normal file → Executable file
|
|
@ -72,6 +72,7 @@ bool CG3Protocol::Init(void)
|
|||
std::cout << "Error opening socket on port UDP" << G3_CONFIG_PORT << " on ip " << g_Reflector.GetListenIp() << std::endl;
|
||||
}
|
||||
|
||||
#ifndef DEBUG_NO_G3_ICMP_SOCKET
|
||||
ok &= m_IcmpRawSocket.Open(IPPROTO_ICMP);
|
||||
if ( !ok )
|
||||
{
|
||||
|
|
@ -85,7 +86,8 @@ bool CG3Protocol::Init(void)
|
|||
m_pPresenceThread = new std::thread(ConfigThread, this);
|
||||
m_pPresenceThread = new std::thread(IcmpThread, this);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// update time
|
||||
m_LastKeepaliveTime.Now();
|
||||
|
||||
|
|
|
|||
14
src/cprotocol.cpp
Normal file → Executable file
14
src/cprotocol.cpp
Normal file → Executable file
|
|
@ -140,7 +140,7 @@ void CProtocol::OnDvFramePacketIn(CDvFramePacket *Frame, const CIp *Ip)
|
|||
CPacketStream *stream = GetStream(Frame->GetStreamId(), Ip);
|
||||
if ( stream == NULL )
|
||||
{
|
||||
std::cout << "Deleting oprhaned Frame Packet with StreamId " << Frame->GetStreamId() << " from " << *Ip << std::endl;
|
||||
// std::cout << "Deleting oprhaned Last Frame Packet with StreamId " << Frame->GetStreamId() << " from " << *Ip << std::endl;
|
||||
delete Frame;
|
||||
}
|
||||
else
|
||||
|
|
@ -159,7 +159,7 @@ void CProtocol::OnDvLastFramePacketIn(CDvLastFramePacket *Frame, const CIp *Ip)
|
|||
CPacketStream *stream = GetStream(Frame->GetStreamId(), Ip);
|
||||
if ( stream == NULL )
|
||||
{
|
||||
std::cout << "Deleting oprhaned Last Frame Packet with StreamId " << Frame->GetStreamId() << " from " << *Ip << std::endl;
|
||||
// std::cout << "Deleting oprhaned Last Frame Packet with StreamId " << Frame->GetStreamId() << " from " << *Ip << std::endl;
|
||||
delete Frame;
|
||||
}
|
||||
else
|
||||
|
|
@ -168,9 +168,12 @@ void CProtocol::OnDvLastFramePacketIn(CDvLastFramePacket *Frame, const CIp *Ip)
|
|||
stream->Lock();
|
||||
stream->Push(Frame);
|
||||
stream->Unlock();
|
||||
|
||||
// and close the stream
|
||||
g_Reflector.CloseStream(stream);
|
||||
|
||||
// and don't close the stream yet but rely on CheckStreamsTimeout
|
||||
// mechanism, so the stream will be closed after the queues have
|
||||
// been sinked out. This avoid last packets to be send back
|
||||
// to transmitting client (master)
|
||||
// g_Reflector.CloseStream(stream);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -266,3 +269,4 @@ uint32 CProtocol::ModuleToDmrDestId(char m) const
|
|||
{
|
||||
return (uint32)(m - 'A')+1;
|
||||
}
|
||||
|
||||
|
|
|
|||
3
src/main.h
Normal file → Executable file
3
src/main.h
Normal file → Executable file
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
#define VERSION_MAJOR 2
|
||||
#define VERSION_MINOR 4
|
||||
#define VERSION_REVISION 0
|
||||
#define VERSION_REVISION 1
|
||||
|
||||
// global ------------------------------------------------------
|
||||
|
||||
|
|
@ -63,6 +63,7 @@
|
|||
|
||||
//#define DEBUG_NO_ERROR_ON_XML_OPEN_FAIL
|
||||
//#define DEBUG_DUMPFILE
|
||||
//#define DEBUG_NO_G3_ICMP_SOCKET
|
||||
|
||||
// reflector ---------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue