rxrpc: Use negative error codes in rxrpc_call struct
Use negative error codes in struct rxrpc_call::error because that's what the kernel normally deals with and to make the code consistent. We only turn them positive when transcribing into a cmsg for userspace recvmsg. Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
@@ -556,7 +556,7 @@ int rxrpc_do_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg, size_t len)
|
||||
ret = -ESHUTDOWN;
|
||||
} else if (cmd == RXRPC_CMD_SEND_ABORT) {
|
||||
ret = 0;
|
||||
if (rxrpc_abort_call("CMD", call, 0, abort_code, ECONNABORTED))
|
||||
if (rxrpc_abort_call("CMD", call, 0, abort_code, -ECONNABORTED))
|
||||
ret = rxrpc_send_abort_packet(call);
|
||||
} else if (cmd != RXRPC_CMD_SEND_DATA) {
|
||||
ret = -EINVAL;
|
||||
|
Reference in New Issue
Block a user