Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22164
b: refs/heads/master
c: 77ff72d
h: refs/heads/master
v: v3
  • Loading branch information
Andrea Bittau authored and David S. Miller committed Mar 21, 2006
1 parent b0206b9 commit bd1264e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ba66c6e8b292997467128506f39fa6607e959050
refs/heads/master: 77ff72d528d5b9d30a47f42f364ba34d931f9da3
26 changes: 15 additions & 11 deletions trunk/net/dccp/ccids/ccid2.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static void ccid2_hc_tx_rto_expire(unsigned long data)
ccid2_hc_tx_check_sanity(hctx);
out:
bh_unlock_sock(sk);
/* sock_put(sk); */
sock_put(sk);
}

static void ccid2_start_rto_timer(struct sock *sk)
Expand Down Expand Up @@ -399,10 +399,12 @@ static int ccid2_ackvector(struct sock *sk, struct sk_buff *skb, int offset,
return -1;
}

static void ccid2_hc_tx_kill_rto_timer(struct ccid2_hc_tx_sock *hctx)
static void ccid2_hc_tx_kill_rto_timer(struct sock *sk)
{
if (del_timer(&hctx->ccid2hctx_rtotimer))
ccid2_pr_debug("deleted RTO timer\n");
struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);

sk_stop_timer(sk, &hctx->ccid2hctx_rtotimer);
ccid2_pr_debug("deleted RTO timer\n");
}

static inline void ccid2_new_ack(struct sock *sk,
Expand Down Expand Up @@ -496,17 +498,19 @@ static inline void ccid2_new_ack(struct sock *sk,
}

/* we got a new ack, so re-start RTO timer */
ccid2_hc_tx_kill_rto_timer(hctx);
ccid2_hc_tx_kill_rto_timer(sk);
ccid2_start_rto_timer(sk);
}

static void ccid2_hc_tx_dec_pipe(struct ccid2_hc_tx_sock *hctx)
static void ccid2_hc_tx_dec_pipe(struct sock *sk)
{
struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);

hctx->ccid2hctx_pipe--;
BUG_ON(hctx->ccid2hctx_pipe < 0);

if (hctx->ccid2hctx_pipe == 0)
ccid2_hc_tx_kill_rto_timer(hctx);
ccid2_hc_tx_kill_rto_timer(sk);
}

static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
Expand Down Expand Up @@ -627,7 +631,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
seqp->ccid2s_acked = 1;
ccid2_pr_debug("Got ack for %llu\n",
seqp->ccid2s_seq);
ccid2_hc_tx_dec_pipe(hctx);
ccid2_hc_tx_dec_pipe(sk);
}
if (seqp == hctx->ccid2hctx_seqt) {
done = 1;
Expand Down Expand Up @@ -674,7 +678,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
while (1) {
if (!seqp->ccid2s_acked) {
loss = 1;
ccid2_hc_tx_dec_pipe(hctx);
ccid2_hc_tx_dec_pipe(sk);
}
if (seqp == hctx->ccid2hctx_seqt)
break;
Expand Down Expand Up @@ -760,9 +764,9 @@ static int ccid2_hc_tx_init(struct sock *sk)
static void ccid2_hc_tx_exit(struct sock *sk)
{
struct dccp_sock *dp = dccp_sk(sk);
struct ccid2_hc_tx_sock *hctx = dp->dccps_hc_tx_ccid_private;
struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);

ccid2_hc_tx_kill_rto_timer(hctx);
ccid2_hc_tx_kill_rto_timer(sk);

kfree(hctx->ccid2hctx_seqbuf);

Expand Down

0 comments on commit bd1264e

Please sign in to comment.