mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-04 03:35:19 +02:00
infra dns for http requests
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "Common/Data/Encoding/Compression.h"
|
||||
#include "Common/Net/NetBuffer.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Core/HLE/sceNet.h"
|
||||
|
||||
namespace net {
|
||||
|
||||
@@ -63,8 +64,10 @@ bool Connection::Resolve(const char *host, int port, DNSType type) {
|
||||
char port_str[16];
|
||||
snprintf(port_str, sizeof(port_str), "%d", port);
|
||||
|
||||
std::string processedHostname = ProcessHostnameWithInfraDNS(std::string(host));
|
||||
|
||||
std::string err;
|
||||
if (!net::DNSResolve(host, port_str, &resolved_, err, type)) {
|
||||
if (!net::DNSResolve(processedHostname.c_str(), port_str, &resolved_, err, type)) {
|
||||
WARN_LOG(Log::IO, "Failed to resolve host '%s': '%s' (%s)", host, err.c_str(), DNSTypeAsString(type));
|
||||
// Zero port so that future calls fail.
|
||||
port_ = 0;
|
||||
|
||||
Reference in New Issue
Block a user