Stubbed out some default (error) logic to NetDll_XNetDnsLookup.

This commit is contained in:
gibbed 2017-01-09 23:47:48 -06:00
parent 89de63b34c
commit 13dd23a8a9
1 changed files with 25 additions and 3 deletions

View File

@ -503,14 +503,36 @@ dword_result_t NetDll_XNetGetEthernetLinkStatus(dword_t caller) { return 0; }
DECLARE_XAM_EXPORT(NetDll_XNetGetEthernetLinkStatus, DECLARE_XAM_EXPORT(NetDll_XNetGetEthernetLinkStatus,
ExportTag::kStub | ExportTag::kNetworking); ExportTag::kStub | ExportTag::kNetworking);
dword_result_t NetDll_XNetDnsLookup(dword_t caller, lpstring_t address, dword_result_t NetDll_XNetDnsLookup(dword_t caller, lpstring_t host,
dword_t evt_handle, dword_t event_handle, lpdword_t pdns) {
pointer_t<XNDNS> host_out) { // TODO(gibbed): actually implement this
if (pdns) {
auto dns_guest = kernel_memory()->SystemHeapAlloc(sizeof(XNDNS));
auto dns = kernel_memory()->TranslateVirtual<XNDNS*>(dns_guest);
dns->status = 1; // non-zero = error
*pdns = dns_guest;
}
if (event_handle) {
auto ev =
kernel_state()->object_table()->LookupObject<XEvent>(event_handle);
assert_not_null(ev);
ev->Set(0, false);
}
return 0; return 0;
} }
DECLARE_XAM_EXPORT(NetDll_XNetDnsLookup, DECLARE_XAM_EXPORT(NetDll_XNetDnsLookup,
ExportTag::kStub | ExportTag::kNetworking); ExportTag::kStub | ExportTag::kNetworking);
dword_result_t NetDll_XNetDnsRelease(dword_t caller, pointer_t<XNDNS> dns) {
if (!dns) {
return X_STATUS_INVALID_PARAMETER;
}
kernel_memory()->SystemHeapFree(dns.guest_address());
return 0;
}
DECLARE_XAM_EXPORT(NetDll_XNetDnsRelease,
ExportTag::kStub | ExportTag::kNetworking);
SHIM_CALL NetDll_XNetQosServiceLookup_shim(PPCContext* ppc_context, SHIM_CALL NetDll_XNetQosServiceLookup_shim(PPCContext* ppc_context,
KernelState* kernel_state) { KernelState* kernel_state) {
uint32_t caller = SHIM_GET_ARG_32(0); uint32_t caller = SHIM_GET_ARG_32(0);