mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-10-30 15:39:02 -05: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:
		| @@ -69,7 +69,5 @@ constexpr ResultCode ERR_NOT_AUTHORIZED(-1); | ||||
| constexpr ResultCode ERR_INVALID_HANDLE_OS(-1); | ||||
| constexpr ResultCode ERR_NOT_FOUND(ErrorModule::Kernel, ErrCodes::NoSuchEntry); | ||||
| 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 | ||||
|   | ||||
| @@ -18,7 +18,7 @@ ServerPort::~ServerPort() = default; | ||||
|  | ||||
| ResultVal<SharedPtr<ServerSession>> ServerPort::Accept() { | ||||
|     if (pending_sessions.empty()) { | ||||
|         return ERR_NO_PENDING_SESSIONS; | ||||
|         return ERR_NOT_FOUND; | ||||
|     } | ||||
|  | ||||
|     auto session = std::move(pending_sessions.back()); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Lioncash
					Lioncash