Loading libs/binder/RpcServer.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -204,11 +204,15 @@ status_t RpcServer::recvmsgSocketConnection(const RpcServer& server, RpcTranspor iovec iov{&zero, sizeof(zero)}; std::vector<std::variant<base::unique_fd, base::borrowed_fd>> fds; if (receiveMessageFromSocket(server.mServer, &iov, 1, &fds) < 0) { ssize_t num_bytes = receiveMessageFromSocket(server.mServer, &iov, 1, &fds); if (num_bytes < 0) { int savedErrno = errno; ALOGE("Failed recvmsg: %s", strerror(savedErrno)); return -savedErrno; } if (num_bytes == 0) { return DEAD_OBJECT; } if (fds.size() != 1) { ALOGE("Expected exactly one fd from recvmsg, got %zu", fds.size()); return -EINVAL; Loading Loading @@ -243,7 +247,10 @@ void RpcServer::join() { socklen_t addrLen = addr.size(); RpcTransportFd clientSocket; if (mAcceptFn(*this, &clientSocket) != OK) { if ((status = mAcceptFn(*this, &clientSocket)) != OK) { if (status == DEAD_OBJECT) break; else continue; } Loading Loading
libs/binder/RpcServer.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -204,11 +204,15 @@ status_t RpcServer::recvmsgSocketConnection(const RpcServer& server, RpcTranspor iovec iov{&zero, sizeof(zero)}; std::vector<std::variant<base::unique_fd, base::borrowed_fd>> fds; if (receiveMessageFromSocket(server.mServer, &iov, 1, &fds) < 0) { ssize_t num_bytes = receiveMessageFromSocket(server.mServer, &iov, 1, &fds); if (num_bytes < 0) { int savedErrno = errno; ALOGE("Failed recvmsg: %s", strerror(savedErrno)); return -savedErrno; } if (num_bytes == 0) { return DEAD_OBJECT; } if (fds.size() != 1) { ALOGE("Expected exactly one fd from recvmsg, got %zu", fds.size()); return -EINVAL; Loading Loading @@ -243,7 +247,10 @@ void RpcServer::join() { socklen_t addrLen = addr.size(); RpcTransportFd clientSocket; if (mAcceptFn(*this, &clientSocket) != OK) { if ((status = mAcceptFn(*this, &clientSocket)) != OK) { if (status == DEAD_OBJECT) break; else continue; } Loading