[Redirector] Optimize code

This commit is contained in:
Connection Refused
2021-10-14 18:08:37 +08:00
parent 48d686533d
commit 110013b2ae
2 changed files with 2 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ bool DNSHandler::INIT()
return true;
}
printf("[Redirector][DNSHandler::INIT] Convert string to address failed: %d\n", WSAGetLastError());
cout << "[Redirector][DNSHandler::INIT] Convert address failed: " << WSAGetLastError() << " [" << dnsHost << ":" << dnsPort << "]" << endl;
return false;
}

View File

@@ -103,7 +103,7 @@ extern "C" {
dnsHost = ws2s(value);
break;
case AIO_DNSPORT:
dnsPort = (USHORT)atoi(ws2s(value).c_str());
dnsPort = static_cast<USHORT>(atoi(ws2s(value).c_str()));
break;
case AIO_TGTHOST:
tgtHost = wstring(value);