diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2007-09-26 01:42:27 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:52:37 -0400 |
commit | b0d045ca45a44d9f8bd66d0a10558b10c60f895a (patch) | |
tree | bdeaf09e5911fb27186e2840133f69e95fb025b5 /net/dccp/output.c | |
parent | e155d7692290f7bc539ccb8ebc3450ec964e53fd (diff) |
[DCCP]: Parameter renaming
The parameter `seq' of dccp_send_sync() is in fact an acknowledgement number
and not a sequence number - thus renamed by this patch into `ackno'.
Secondly, a `critical' warning is added when a Sync/SyncAck could not be sent.
Sanity: I have checked all other functions that are called in dccp_transmit_skb,
there are no clashes with the use of dccpd_ack_seq; no other function is
using this slot at the same time.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/output.c')
-rw-r--r-- | net/dccp/output.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c index c8d843e983fc..6e23d5b57e79 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -69,7 +69,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) | |||
69 | 69 | ||
70 | case DCCP_PKT_SYNC: | 70 | case DCCP_PKT_SYNC: |
71 | case DCCP_PKT_SYNCACK: | 71 | case DCCP_PKT_SYNCACK: |
72 | ackno = dcb->dccpd_seq; | 72 | ackno = dcb->dccpd_ack_seq; |
73 | /* fall through */ | 73 | /* fall through */ |
74 | default: | 74 | default: |
75 | /* | 75 | /* |
@@ -507,7 +507,7 @@ void dccp_send_delayed_ack(struct sock *sk) | |||
507 | sk_reset_timer(sk, &icsk->icsk_delack_timer, timeout); | 507 | sk_reset_timer(sk, &icsk->icsk_delack_timer, timeout); |
508 | } | 508 | } |
509 | 509 | ||
510 | void dccp_send_sync(struct sock *sk, const u64 seq, | 510 | void dccp_send_sync(struct sock *sk, const u64 ackno, |
511 | const enum dccp_pkt_type pkt_type) | 511 | const enum dccp_pkt_type pkt_type) |
512 | { | 512 | { |
513 | /* | 513 | /* |
@@ -517,14 +517,16 @@ void dccp_send_sync(struct sock *sk, const u64 seq, | |||
517 | */ | 517 | */ |
518 | struct sk_buff *skb = alloc_skb(sk->sk_prot->max_header, GFP_ATOMIC); | 518 | struct sk_buff *skb = alloc_skb(sk->sk_prot->max_header, GFP_ATOMIC); |
519 | 519 | ||
520 | if (skb == NULL) | 520 | if (skb == NULL) { |
521 | /* FIXME: how to make sure the sync is sent? */ | 521 | /* FIXME: how to make sure the sync is sent? */ |
522 | DCCP_CRIT("could not send %s", dccp_packet_name(pkt_type)); | ||
522 | return; | 523 | return; |
524 | } | ||
523 | 525 | ||
524 | /* Reserve space for headers and prepare control bits. */ | 526 | /* Reserve space for headers and prepare control bits. */ |
525 | skb_reserve(skb, sk->sk_prot->max_header); | 527 | skb_reserve(skb, sk->sk_prot->max_header); |
526 | DCCP_SKB_CB(skb)->dccpd_type = pkt_type; | 528 | DCCP_SKB_CB(skb)->dccpd_type = pkt_type; |
527 | DCCP_SKB_CB(skb)->dccpd_seq = seq; | 529 | DCCP_SKB_CB(skb)->dccpd_ack_seq = ackno; |
528 | 530 | ||
529 | dccp_transmit_skb(sk, skb); | 531 | dccp_transmit_skb(sk, skb); |
530 | } | 532 | } |