From 507102c99e713517a4b944796e0963664321e840 Mon Sep 17 00:00:00 2001 From: noah the goodra Date: Mon, 6 Feb 2017 11:22:10 -0600 Subject: [PATCH] basic clear dns cache clear code i implemented the dnscacheclear function --- src/core/hle/service/http_c.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/hle/service/http_c.cpp b/src/core/hle/service/http_c.cpp index 84a68c2cf..02a92d0f4 100644 --- a/src/core/hle/service/http_c.cpp +++ b/src/core/hle/service/http_c.cpp @@ -7,6 +7,14 @@ namespace Service { namespace HTTP { void ClearDNSCache(Interface* self) { +#ifdef _WIN32 + system("ipconfig /flush dns"); +#elif __APPLE__ + system("sudo killall -HUP mDNSResponder"); +#else + system("/etc/init.d/named restart"); + system("/etc/init.d/nscd restart"); +#endif u32* cmd_buff = Kernel::GetCommandBuffer(); cmd_buff[1] = RESULT_SUCCESS.raw; // No error LOG_DEBUG(Service_HTTP, "(STUBBED) called");