mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-12-16 07:45:33 +00:00
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:
parent
afb7e5cc05
commit
b703aba622
|
@ -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
|
||||||
|
|
|
@ -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());
|
||||||
|
|
Loading…
Reference in a new issue