Skip to content

Commit

Permalink
fix some ipc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
misson20000 committed Dec 14, 2019
1 parent 191c0dc commit a3360d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion twili/ipcbind/ro/IDebugMonitorInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Result<std::vector<NroInfo>> IDebugMonitorInterface::GetNroInfos(uint64_t pid) {
r = object.SendSyncRequest<0>( // GetNroInfos
trn::ipc::InRaw<uint64_t>(pid),
trn::ipc::OutRaw<uint32_t>(num_nro_infos),
trn::ipc::Buffer<NroInfo, 0xA>(nro_info.data(), nro_info.size() * sizeof(NroInfo)));
trn::ipc::Buffer<NroInfo, 0x6>(nro_info.data(), nro_info.size() * sizeof(NroInfo)));
} while(r && num_nro_infos > nro_info.size());
nro_info.resize(num_nro_infos);

Expand Down
6 changes: 3 additions & 3 deletions twili/process/ShellTracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ ShellTracker::ShellTracker(Twili &twili) :
[this]() {
std::unique_lock<thread::Mutex> lock(queue_mutex);
shell_event.ResetSignal();
uint64_t evt;
uint32_t evt;
uint64_t pid;
Result<std::nullopt_t> r = std::nullopt;
while(
(r = this->twili.services.ns_dev.SendSyncRequest<5>( // GetShellEventInfo
ipc::OutRaw<uint64_t>(evt),
ipc::OutRaw<uint32_t>(evt),
ipc::OutRaw<uint64_t>(pid)))) {
auto i = tracking.find(pid);
if(evt == 1) { // exit
Expand All @@ -76,7 +76,7 @@ ShellTracker::ShellTracker(Twili &twili) :
printf("Unknown ns:dev shell event for 0x%lx: %d\n", pid, evt);
}
}
if(r.error().code != 0x610) { // no events left
if(r.error().code != 0x610 && r.error().code != 0x4e4) { // no events left
ResultCode::AssertOk(std::move(r));
}
return true;
Expand Down

0 comments on commit a3360d0

Please sign in to comment.