mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Include port
This commit is contained in:
parent
3cb390c6e6
commit
7fa0ef56f3
|
@ -241,7 +241,7 @@ void CNetConnection::DirectInit(const NETADDR &Addr, SECURITY_TOKEN SecurityToke
|
|||
m_State = NET_CONNSTATE_ONLINE;
|
||||
|
||||
m_PeerAddr = Addr;
|
||||
net_addr_str(&Addr, m_aPeerAddrStr, sizeof(m_aPeerAddrStr), false);
|
||||
net_addr_str(&Addr, m_aPeerAddrStr, sizeof(m_aPeerAddrStr), true);
|
||||
mem_zero(m_aErrorString, sizeof(m_aErrorString));
|
||||
|
||||
int64_t Now = time_get();
|
||||
|
@ -355,7 +355,7 @@ int CNetConnection::Feed(CNetPacketConstruct *pPacket, NETADDR *pAddr, SECURITY_
|
|||
Reset();
|
||||
m_State = NET_CONNSTATE_PENDING;
|
||||
m_PeerAddr = *pAddr;
|
||||
net_addr_str(pAddr, m_aPeerAddrStr, sizeof(m_aPeerAddrStr), false);
|
||||
net_addr_str(pAddr, m_aPeerAddrStr, sizeof(m_aPeerAddrStr), true);
|
||||
mem_zero(m_aErrorString, sizeof(m_aErrorString));
|
||||
m_LastSendTime = Now;
|
||||
m_LastRecvTime = Now;
|
||||
|
@ -383,7 +383,7 @@ int CNetConnection::Feed(CNetPacketConstruct *pPacket, NETADDR *pAddr, SECURITY_
|
|||
if(CtrlMsg == NET_CTRLMSG_CONNECTACCEPT)
|
||||
{
|
||||
m_PeerAddr = *pAddr;
|
||||
net_addr_str(pAddr, m_aPeerAddrStr, sizeof(m_aPeerAddrStr), false);
|
||||
net_addr_str(pAddr, m_aPeerAddrStr, sizeof(m_aPeerAddrStr), true);
|
||||
if(m_SecurityToken == NET_SECURITY_TOKEN_UNKNOWN && pPacket->m_DataSize >= (int)(1 + sizeof(SECURITY_TOKEN_MAGIC) + sizeof(m_SecurityToken)) && !mem_comp(&pPacket->m_aChunkData[1], SECURITY_TOKEN_MAGIC, sizeof(SECURITY_TOKEN_MAGIC)))
|
||||
{
|
||||
m_SecurityToken = ToSecurityToken(&pPacket->m_aChunkData[1 + sizeof(SECURITY_TOKEN_MAGIC)]);
|
||||
|
|
Loading…
Reference in a new issue