mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed resetting the error string of a net connection. Closes #954
This commit is contained in:
parent
86cd0cefd7
commit
7be3c2e634
|
@ -25,6 +25,8 @@ void CNetConnection::Reset()
|
||||||
m_Buffer.Init();
|
m_Buffer.Init();
|
||||||
|
|
||||||
mem_zero(&m_Construct, sizeof(m_Construct));
|
mem_zero(&m_Construct, sizeof(m_Construct));
|
||||||
|
|
||||||
|
mem_zero(m_ErrorString, sizeof(m_ErrorString));
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *CNetConnection::ErrorString()
|
const char *CNetConnection::ErrorString()
|
||||||
|
@ -44,7 +46,6 @@ void CNetConnection::Init(NETSOCKET Socket, bool BlockCloseMsg)
|
||||||
|
|
||||||
m_Socket = Socket;
|
m_Socket = Socket;
|
||||||
m_BlockCloseMsg = BlockCloseMsg;
|
m_BlockCloseMsg = BlockCloseMsg;
|
||||||
mem_zero(m_ErrorString, sizeof(m_ErrorString));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNetConnection::AckChunks(int Ack)
|
void CNetConnection::AckChunks(int Ack)
|
||||||
|
@ -168,7 +169,6 @@ int CNetConnection::Connect(NETADDR *pAddr)
|
||||||
// init connection
|
// init connection
|
||||||
Reset();
|
Reset();
|
||||||
m_PeerAddr = *pAddr;
|
m_PeerAddr = *pAddr;
|
||||||
mem_zero(m_ErrorString, sizeof(m_ErrorString));
|
|
||||||
m_State = NET_CONNSTATE_CONNECT;
|
m_State = NET_CONNSTATE_CONNECT;
|
||||||
SendControl(NET_CTRLMSG_CONNECT, 0, 0);
|
SendControl(NET_CTRLMSG_CONNECT, 0, 0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue