yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

kernel/server_port: Change error case return value in Accept() to ERR_NOT_FOUND

This is what the kernel does in this instance.
This commit is contained in:
Lioncash 2018-10-24 14:23:36 -04:00
parent afb7e5cc05
commit b703aba622
2 changed files with 1 additions and 3 deletions

View File

@ -69,7 +69,5 @@ constexpr ResultCode ERR_NOT_AUTHORIZED(-1);
constexpr ResultCode ERR_INVALID_HANDLE_OS(-1); constexpr ResultCode ERR_INVALID_HANDLE_OS(-1);
constexpr ResultCode ERR_NOT_FOUND(ErrorModule::Kernel, ErrCodes::NoSuchEntry); constexpr ResultCode ERR_NOT_FOUND(ErrorModule::Kernel, ErrCodes::NoSuchEntry);
constexpr ResultCode RESULT_TIMEOUT(ErrorModule::Kernel, ErrCodes::Timeout); constexpr ResultCode RESULT_TIMEOUT(ErrorModule::Kernel, ErrCodes::Timeout);
/// Returned when Accept() is called on a port with no sessions to be accepted.
constexpr ResultCode ERR_NO_PENDING_SESSIONS(-1);
} // namespace Kernel } // namespace Kernel

View File

@ -18,7 +18,7 @@ ServerPort::~ServerPort() = default;
ResultVal<SharedPtr<ServerSession>> ServerPort::Accept() { ResultVal<SharedPtr<ServerSession>> ServerPort::Accept() {
if (pending_sessions.empty()) { if (pending_sessions.empty()) {
return ERR_NO_PENDING_SESSIONS; return ERR_NOT_FOUND;
} }
auto session = std::move(pending_sessions.back()); auto session = std::move(pending_sessions.back());