From ded8dd9d099f19981db8f6fe6fe330431727ae16 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sun, 4 Nov 2018 12:45:29 -0800 Subject: [PATCH] fs.mitm: Only create storage interface when needed. --- include/stratosphere/mitm/mitm_session.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/stratosphere/mitm/mitm_session.hpp b/include/stratosphere/mitm/mitm_session.hpp index f4df504f..3a403216 100644 --- a/include/stratosphere/mitm/mitm_session.hpp +++ b/include/stratosphere/mitm/mitm_session.hpp @@ -21,6 +21,8 @@ #include "mitm_query_service.hpp" +#define RESULT_FORWARD_TO_SESSION 0xCAFEFC + class MitmSession final : public ServiceSession { private: /* This will be for the actual session. */ @@ -149,7 +151,7 @@ class MitmSession final : public ServiceSession { } } - if (!found_entry) { + if (!found_entry || rc == RESULT_FORWARD_TO_SESSION) { memcpy(armGetTls(), this->backup_tls, sizeof(this->backup_tls)); rc = ForwardRequest(ctx); }