mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-24 08:56:46 +00:00
use inet_ntop instead of inet_ntoa (STILL BROKEN THOUGH)
This commit is contained in:
@@ -254,7 +254,10 @@ 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);
|
||||||
Client->SetIdentifier("ip", inet_ntoa(reinterpret_cast<const struct sockaddr_in*>(&ClientConnection.SockAddr)->sin_addr));
|
char AddrBuf[30];
|
||||||
|
inet_ntoa(reinterpret_cast<const struct sockaddr_in*>(&ClientConnection.SockAddr)->sin_addr);
|
||||||
|
auto str = inet_ntop(AF_INET, static_cast<const void*>(reinterpret_cast<const struct sockaddr_in*>(&ClientConnection.SockAddr)), AddrBuf, sizeof(struct sockaddr_in));
|
||||||
|
Client->SetIdentifier("ip", str);
|
||||||
|
|
||||||
std::string Rc;
|
std::string Rc;
|
||||||
info("Identifying new ClientConnection...");
|
info("Identifying new ClientConnection...");
|
||||||
|
|||||||
Reference in New Issue
Block a user