1
0
mirror of https://github.com/ShaYmez/xlxd.git synced 2026-07-25 11:34:11 -04:00

xlxd 1.3.6

This commit is contained in:
LX3JL
2016-04-18 09:59:32 +02:00
parent 1b0125ef74
commit 2ed3b28de6
9 changed files with 96 additions and 65 deletions
+22 -10
View File
@@ -112,16 +112,28 @@ void CDextraProtocol::Task(void)
// callsign authorized?
if ( g_GateKeeper.MayLink(Callsign, Ip, PROTOCOL_DEXTRA) )
{
// acknowledge the request
EncodeConnectAckPacket(&Buffer, ProtRev);
m_Socket.Send(Buffer, Ip);
// create the client
CDextraClient *client = new CDextraClient(Callsign, Ip, ToLinkModule, ProtRev);
// and append
g_Reflector.GetClients()->AddClient(client);
g_Reflector.ReleaseClients();
// valid module ?
if ( g_Reflector.IsValidModule(ToLinkModule) )
{
// acknowledge the request
EncodeConnectAckPacket(&Buffer, ProtRev);
m_Socket.Send(Buffer, Ip);
// create the client
CDextraClient *client = new CDextraClient(Callsign, Ip, ToLinkModule, ProtRev);
// and append
g_Reflector.GetClients()->AddClient(client);
g_Reflector.ReleaseClients();
}
else
{
std::cout << "DExtra node " << Callsign << " connect attempt on non-existing module" << std::endl;
// deny the request
EncodeConnectNackPacket(&Buffer);
m_Socket.Send(Buffer, Ip);
}
}
else
{