Skip to content

Commit

Permalink
fix crash when Initialize is called
Browse files Browse the repository at this point in the history
  • Loading branch information
spacemeowx2 committed Dec 28, 2019
1 parent 39303da commit 1c85d92
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ services:
build: .
volumes:
- ".:/code"
command: make
command: make -j8
9 changes: 5 additions & 4 deletions ldn_mitm/source/ldn_icommunication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace ams::mitm::ldn {

// https://reswitched.github.io/SwIPC/ifaces.html#nn::ldn::detail::IUserLocalCommunicationService

Result ICommunicationInterface::Initialize(u64 unk, sf::ClientProcessId pid) {
LogFormat("ICommunicationInterface::Initialize unk: %" PRIu64 " pid: %" PRIu64, unk, pid);
Result ICommunicationInterface::Initialize(const sf::ClientProcessId &client_process_id) {
LogFormat("ICommunicationInterface::Initialize pid: %" PRIu64, client_process_id);

if (this->state_event == nullptr) {
this->state_event = new os::SystemEvent(true);
Expand All @@ -21,8 +21,9 @@ namespace ams::mitm::ldn {
return ResultSuccess();
}

Result ICommunicationInterface::InitializeSystem2(u64 unk, sf::ClientProcessId pid) {
return this->Initialize(unk, pid);
Result ICommunicationInterface::InitializeSystem2(u64 unk, const sf::ClientProcessId &client_process_id) {
LogFormat("ICommunicationInterface::InitializeSystem2 unk: %" PRIu64, unk);
return this->Initialize(client_process_id);
}

Result ICommunicationInterface::Finalize() {
Expand Down
4 changes: 2 additions & 2 deletions ldn_mitm/source/ldn_icommunication.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ namespace ams::mitm::ldn {
private:
void onEventFired();
private:
Result Initialize(u64 unk, sf::ClientProcessId pid);
Result InitializeSystem2(u64 unk, sf::ClientProcessId pid);
Result Initialize(const sf::ClientProcessId &client_process_id);
Result InitializeSystem2(u64 unk, const sf::ClientProcessId &client_process_id);
Result Finalize();
Result GetState(sf::Out<u32> state);
Result GetNetworkInfo(sf::Out<NetworkInfo> buffer);
Expand Down

0 comments on commit 1c85d92

Please sign in to comment.