fixed a server register issue

This commit is contained in:
oy 2010-06-13 19:34:14 +02:00
parent d7c106ca90
commit a5bc567e84

View file

@ -231,6 +231,23 @@ void CRegister::RegisterUpdate()
int CRegister::RegisterProcessPacket(CNetChunk *pPacket)
{
// check for masterserver address
bool Valid = false;
NETADDR Addr1 = pPacket->m_Address;
Addr1.port = 0;
for(int i = 0; i < IMasterServer::MAX_MASTERSERVERS; i++)
{
NETADDR Addr2 = m_aMasterserverInfo[i].m_Addr;
Addr2.port = 0;
if(net_addr_comp(&Addr1, &Addr2) == 0)
{
Valid = true;
break;
}
}
if(!Valid)
return 0;
if(pPacket->m_DataSize == sizeof(SERVERBROWSE_FWCHECK) &&
mem_comp(pPacket->m_pData, SERVERBROWSE_FWCHECK, sizeof(SERVERBROWSE_FWCHECK)) == 0)
{