Skip to content

Commit

Permalink
rxrpc: terminate retrans loop when sending of skb fails
Browse files Browse the repository at this point in the history
Typo, 'stop' is never set to true.
Seems intent is to not attempt to retransmit more packets after sendmsg
returns an error.

This change is based on code inspection only.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Westphal authored and David S. Miller committed Mar 1, 2015
1 parent 56b08fd commit c03ae53
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions net/rxrpc/ar-ack.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,16 @@ static void rxrpc_resend(struct rxrpc_call *call)
struct rxrpc_header *hdr;
struct sk_buff *txb;
unsigned long *p_txb, resend_at;
int loop, stop;
bool stop;
int loop;
u8 resend;

_enter("{%d,%d,%d,%d},",
call->acks_hard, call->acks_unacked,
atomic_read(&call->sequence),
CIRC_CNT(call->acks_head, call->acks_tail, call->acks_winsz));

stop = 0;
stop = false;
resend = 0;
resend_at = 0;

Expand Down Expand Up @@ -255,7 +256,7 @@ static void rxrpc_resend(struct rxrpc_call *call)
_proto("Tx DATA %%%u { #%d }",
ntohl(sp->hdr.serial), ntohl(sp->hdr.seq));
if (rxrpc_send_packet(call->conn->trans, txb) < 0) {
stop = 0;
stop = true;
sp->resend_at = jiffies + 3;
} else {
sp->resend_at =
Expand Down

0 comments on commit c03ae53

Please sign in to comment.