basic clear dns cache clear code

i implemented the dnscacheclear function
This commit is contained in:
noah the goodra 2017-02-06 11:22:10 -06:00
parent b17c40d692
commit 507102c99e

View File

@ -7,6 +7,14 @@
namespace Service { namespace Service {
namespace HTTP { namespace HTTP {
void ClearDNSCache(Interface* self) { 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(); u32* cmd_buff = Kernel::GetCommandBuffer();
cmd_buff[1] = RESULT_SUCCESS.raw; // No error cmd_buff[1] = RESULT_SUCCESS.raw; // No error
LOG_DEBUG(Service_HTTP, "(STUBBED) called"); LOG_DEBUG(Service_HTTP, "(STUBBED) called");