fs.mitm: Only create storage interface when needed.

This commit is contained in:
Michael Scire
2018-11-04 12:45:29 -08:00
parent 158f7224a7
commit e786bc7e9a
4 changed files with 39 additions and 28 deletions

View File

@@ -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);
}