From 97c4996deb230d2cef86790076549c7eadb58d87 Mon Sep 17 00:00:00 2001 From: LX3JL Date: Thu, 28 Apr 2016 10:59:20 +0200 Subject: [PATCH] xlxd 1.3.7 --- src/cdextraprotocol.cpp | 7 ++++++- src/cdplusprotocol.cpp | 6 +++++- src/cgatekeeper.cpp | 2 +- src/main.h | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/cdextraprotocol.cpp b/src/cdextraprotocol.cpp index 43c1123..99d1375 100644 --- a/src/cdextraprotocol.cpp +++ b/src/cdextraprotocol.cpp @@ -157,7 +157,11 @@ void CDextraProtocol::Task(void) EncodeDisconnectedPacket(&Buffer); m_Socket.Send(Buffer, Ip); } - // and remove it + else if ( client->GetProtocolRevision() == 2 ) + { + m_Socket.Send(Buffer, Ip); + } + // and remove it clients->RemoveClient(client); } g_Reflector.ReleaseClients(); @@ -179,6 +183,7 @@ void CDextraProtocol::Task(void) else { std::cout << "DExtra packet (" << Buffer.size() << ")" << std::endl; + //std::cout << Buffer.data() << std::endl; } } diff --git a/src/cdplusprotocol.cpp b/src/cdplusprotocol.cpp index f56ab7f..9c019bf 100644 --- a/src/cdplusprotocol.cpp +++ b/src/cdplusprotocol.cpp @@ -142,12 +142,16 @@ void CDplusProtocol::Task(void) { std::cout << "DPlus disconnect packet from " << Ip << std::endl; - // find client & remove it + // find client CClients *clients = g_Reflector.GetClients(); CClient *client = clients->FindClient(Ip, PROTOCOL_DPLUS); if ( client != NULL ) { + // remove it clients->RemoveClient(client); + // and acknowledge the disconnect + EncodeDisconnectPacket(&Buffer); + m_Socket.Send(Buffer, Ip); } g_Reflector.ReleaseClients(); } diff --git a/src/cgatekeeper.cpp b/src/cgatekeeper.cpp index 139f0ec..56f55be 100644 --- a/src/cgatekeeper.cpp +++ b/src/cgatekeeper.cpp @@ -157,7 +157,7 @@ bool CGateKeeper::MayTransmit(const CCallsign &callsign, const CIp &ip, int prot // report if ( !ok ) { - std::cout << "Gatekeeper blocking transmiting of " << callsign << " @ " << ip << " using protocol " << protocol << std::endl; + std::cout << "Gatekeeper blocking transmitting of " << callsign << " @ " << ip << " using protocol " << protocol << std::endl; } // done diff --git a/src/main.h b/src/main.h index b99a70b..52c1a18 100644 --- a/src/main.h +++ b/src/main.h @@ -48,7 +48,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 3 -#define VERSION_REVISION 6 +#define VERSION_REVISION 7 // global ------------------------------------------------------