pm: inform sm of title ids. remove inconsistent mitm association.

This commit is contained in:
Michael Scire authored and SciresM committed 2019-07-11 22:24:59 -07:00
1 parent 4db212ea7b
commit 6777dd9b38
19 files changed
+150 -97

No files matched your search

@@ -27,7 +27,7 @@ class BpcMitmService : public IMitmServiceObject {
RebootSystem = 1,
};
public:
BpcMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
BpcMitmService(std::shared_ptr<Service> s, u64 pid, sts::ncm::TitleId tid) : IMitmServiceObject(s, pid, tid) {
/* ... */
}
@@ -73,12 +73,6 @@ void FsMitmService::PostProcess(IMitmServiceObject *obj, IpcResponseContext *ctx
case CommandId::SetCurrentProcess:
if (R_SUCCEEDED(ctx->rc)) {
this_ptr->has_initialized = true;
this_ptr->process_id = ctx->request.Pid;
this_ptr->title_id = sts::ncm::TitleId{this_ptr->process_id};
if (R_FAILED(MitmQueryUtils::GetAssociatedTidForPid(this_ptr->process_id, &this_ptr->title_id))) {
/* Log here, if desired. */
}
break;
}
break;
default:
@@ -44,7 +44,7 @@ class FsMitmService : public IMitmServiceObject {
bool has_initialized = false;
bool should_override_contents;
public:
FsMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
FsMitmService(std::shared_ptr<Service> s, u64 pid, sts::ncm::TitleId tid) : IMitmServiceObject(s, pid, tid) {
if (Utils::HasSdDisableMitMFlag(static_cast<u64>(this->title_id))) {
this->should_override_contents = false;
} else {
@@ -28,7 +28,7 @@ class NsAmMitmService : public IMitmServiceObject {
GetRunningApplicationProgramId = 92,
};
public:
NsAmMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
NsAmMitmService(std::shared_ptr<Service> s, u64 pid, sts::ncm::TitleId tid) : IMitmServiceObject(s, pid, tid) {
/* ... */
}
@@ -67,7 +67,7 @@ class NsWebMitmService : public IMitmServiceObject {
GetDocumentInterface = 7999,
};
public:
NsWebMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
NsWebMitmService(std::shared_ptr<Service> s, u64 pid, sts::ncm::TitleId tid) : IMitmServiceObject(s, pid, tid) {
/* ... */
}
@@ -35,7 +35,7 @@ class SetMitmService : public IMitmServiceObject {
OverrideLocale locale;
bool got_locale;
public:
SetMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
SetMitmService(std::shared_ptr<Service> s, u64 pid, sts::ncm::TitleId tid) : IMitmServiceObject(s, pid, tid) {
this->got_locale = false;
}
@@ -33,7 +33,7 @@ class SetSysMitmService : public IMitmServiceObject {
GetEdid = 41,
};
public:
SetSysMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
SetSysMitmService(std::shared_ptr<Service> s, u64 pid, sts::ncm::TitleId tid) : IMitmServiceObject(s, pid, tid) {
/* ... */
}