New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOS/KD: Implement NWC24_CHECK_MAIL_NOW #12108
Conversation
be16cab
to
6e13a54
Compare
6e13a54
to
100c997
Compare
4f825c0
to
06433d5
Compare
06433d5
to
34abdf4
Compare
34abdf4
to
eecc36d
Compare
38bf9ac
to
990c9df
Compare
c937615
to
cc9ecf7
Compare
@@ -173,6 +180,17 @@ void HttpRequest::Impl::FollowRedirects(long max) | |||
curl_easy_setopt(m_curl.get(), CURLOPT_MAXREDIRS, max); | |||
} | |||
|
|||
std::string HttpRequest::Impl::GetHeaderValue(std::string_view name) const | |||
{ | |||
for (const auto& [key, value] : m_response_headers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a slight optimization could be done here? If m_response_headers
supported heterogeneous lookup you could use the name
as the key in the map. I don't think this is blocking but something to consider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM. Untested
if (!file || !file->Read(&m_data, 1)) | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the file not existing is normal operation (eg. on initial system menu boot), but if it exists but isn't large enough should there be a error log? We have a lot of users with questionable NANDs out there...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There probably should, if the file is corrupted the Wii Menu will display the System Files are corrupted
error on any attempt to launch the message board.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Untested, but this looks pretty good to me now. Is there a good way to test this as-is?
On another note, I am thinking that we should block starting the scheduler if the user is using the default console ID. |
cc9ecf7
to
6d20510
Compare
Yes, blocking the Mail features for the default NAND makes sense. |
6d20510
to
d7b4d4b
Compare
I wanted to future proof this for when we support downloading in the scheduler, so instead of blocking the scheduler starting, I just block dispatching the mail task. |
Tangential to this PR technically, but probably worth fixing before we do threading here... dolphin/Source/Core/Core/IOS/Network/KD/NetKDRequest.cpp Lines 516 to 520 in f063fb3
This also doesn't seem to lock the |
627395e
to
55ad993
Compare
55ad993
to
d52725c
Compare
d52725c
to
2154941
Compare
Okay, I think I'm good now. I don't have a setup for testing this so if you don't mind, please give it a go after the recent changes to see if everything still works as expected from your perspective, and if yes give me a poke to merge. |
This PR implements both a scheduler for WiiConnect24 as well as the NWC24_CHECK_MAIL_NOW ioctl.
I have decided to split #11746 into separate PR's for easier reviewing.