Commit 1c33e6a9 authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix

parent 0b57c856
......@@ -45,11 +45,13 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
char ip[20];
const wchar_t* pstr = mainGame->ebJoinIP->getText();
BufferIO::CopyWStr(pstr, hostname, 100);
//fprintf(stderr, "getaddrinfo error: %s\n", gai_strerror(status));
//error handling
}
else
}
if ((status = getaddrinfo(hostname, NULL, &hints, &servinfo)) == -1) {
//fprintf(stderr, "getaddrinfo error: %s\n", gai_strerror(status));
//error handling
BufferIO::CopyWStr(pstr, ip, 16);
} else
inet_ntop(AF_INET, &(((struct sockaddr_in *)servinfo->ai_addr)->sin_addr), ip, 20);
freeaddrinfo(servinfo);
unsigned int remote_addr = htonl(inet_addr(ip));
unsigned int remote_port = _wtoi(mainGame->ebJoinPort->getText());
BufferIO::CopyWStr(pstr, mainGame->gameConf.lastip, 20);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment