mitm: Improve session acquire semantics.

This commit is contained in:
Michael Scire 2018-11-15 14:19:34 -08:00
commit 46cc08160d
5 changed files with 65 additions and 6 deletions

View file

@ -98,6 +98,20 @@ Result UserService::AtmosphereUninstallMitm(SmServiceName service) {
return rc;
}
Result UserService::AtmosphereAcknowledgeMitmSession(Out<u64> client_pid, Out<MovedHandle> fwd_h, SmServiceName service) {
Result rc = 0x415;
Handle out_fwd_h = 0;
if (this->has_initialized) {
rc = Registration::AcknowledgeMitmSessionForPid(this->pid, smEncodeName(service.name), &out_fwd_h, client_pid.GetPointer());
}
if (R_SUCCEEDED(rc)) {
fwd_h.SetValue(out_fwd_h);
}
return rc;
}
Result UserService::AtmosphereAssociatePidTidForMitm(u64 pid, u64 tid) {
Result rc = 0x415;
if (this->has_initialized) {