mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-06-17 22:23:03 +00:00
TNetwork: Possible ip address fix
This commit is contained in:
+3
-3
@@ -205,9 +205,9 @@ void TNetwork::HandleDownload(SOCKET TCPSock) {
|
|||||||
|
|
||||||
void TNetwork::Authentication(const TConnection& ClientConnection) {
|
void TNetwork::Authentication(const TConnection& ClientConnection) {
|
||||||
auto Client = CreateClient(ClientConnection.Socket);
|
auto Client = CreateClient(ClientConnection.Socket);
|
||||||
char AddrBuf[30];
|
char AddrBuf[64];
|
||||||
inet_ntoa(reinterpret_cast<const struct sockaddr_in*>(&ClientConnection.SockAddr)->sin_addr);
|
// TODO: IPv6 would need this to be changed
|
||||||
auto str = inet_ntop(AF_INET, static_cast<const void*>(reinterpret_cast<const struct sockaddr_in*>(&ClientConnection.SockAddr)), AddrBuf, sizeof(struct sockaddr_in));
|
auto str = inet_ntop(AF_INET, static_cast<const void*>(reinterpret_cast<const struct sockaddr_in*>(&ClientConnection.SockAddr)), AddrBuf, sizeof(ClientConnection.SockAddr));
|
||||||
Client->SetIdentifier("ip", str);
|
Client->SetIdentifier("ip", str);
|
||||||
|
|
||||||
std::string Rc;
|
std::string Rc;
|
||||||
|
|||||||
Reference in New Issue
Block a user