sysdeps/managarm: Fix sys_peername
... after Managarm update.
@@ -205,14 +205,14 @@ int sys_peername(int fd, struct sockaddr *addr_ptr, socklen_t max_addr_length,
HEL_CHECK(offer.error());
HEL_CHECK(sendReq.error());
+ if(recvResp.error() == kHelErrDismissed)
+ return ENOTSOCK;
HEL_CHECK(recvResp.error());
- if (recvData.error() != kHelErrEndOfLane)
HEL_CHECK(recvData.error());
managarm::fs::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator());
resp.ParseFromArray(recvResp.data(), recvResp.length());
- if(resp.error() == managarm::fs::Errors::ILLEGAL_REQUEST
- || resp.error() == managarm::fs::Errors::ILLEGAL_OPERATION_TARGET) {
+ if(resp.error() == managarm::fs::Errors::ILLEGAL_OPERATION_TARGET) {
return ENOTSOCK;
}else if(resp.error() == managarm::fs::Errors::NOT_CONNECTED) {
return ENOTCONN;
