stratosphere: Fix fs.mitm bis_protect race condition.

This commit is contained in:
Michael Scire
2018-11-30 02:42:48 -08:00
parent bcdfc53d7d
commit 49ad66e478
9 changed files with 41 additions and 10 deletions

View File

@@ -89,6 +89,12 @@ int main(int argc, char **argv)
Thread hid_initializer_thread = {0};
consoleDebugInit(debugDevice_SVC);
/* TODO: What's a good timeout value to use here? */
auto server_manager = new FsMitmManager(5);
/* Create fsp-srv mitm. */
AddMitmServerToManager<FsMitmService>(server_manager, "fsp-srv", 61);
if (R_FAILED(threadCreate(&sd_initializer_thread, &Utils::InitializeSdThreadFunc, NULL, 0x4000, 0x15, 0))) {
/* TODO: Panic. */
}
@@ -102,12 +108,6 @@ int main(int argc, char **argv)
if (R_FAILED(threadStart(&hid_initializer_thread))) {
/* TODO: Panic. */
}
/* TODO: What's a good timeout value to use here? */
auto server_manager = new FsMitmManager(5);
/* Create fsp-srv mitm. */
AddMitmServerToManager<FsMitmService>(server_manager, "fsp-srv", 61);
/* Loop forever, servicing our services. */
server_manager->Process();