diff options
author | Ian McDonald <ian.mcdonald@jandi.co.nz> | 2006-11-10 13:09:10 -0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-02 21:22:02 -0800 |
commit | f45b3ec481581f24719d8ab0bc812c02fcedc2bc (patch) | |
tree | fd3907c220fe75055494466f1f3664a13ac095d4 /net/dccp/output.c | |
parent | fec5b80e4924f638418c21b09165dce8b79fee86 (diff) | |
download | op-kernel-dev-f45b3ec481581f24719d8ab0bc812c02fcedc2bc.zip op-kernel-dev-f45b3ec481581f24719d8ab0bc812c02fcedc2bc.tar.gz |
[DCCP]: Fix logfile overflow
This patch fixes data being spewed into the logs continually. As the
code stood if there was a large queue and long delays timeo would go
down to zero and never get reset.
This fixes it by resetting timeo. Put constant into header as well.
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/dccp/output.c')
-rw-r--r-- | net/dccp/output.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c index 1ae2248..5165497 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c @@ -249,8 +249,8 @@ void dccp_write_xmit(struct sock *sk, int block) { struct dccp_sock *dp = dccp_sk(sk); struct sk_buff *skb; - long timeo = 30000; /* If a packet is taking longer than 2 secs - we have other issues */ + long timeo = DCCP_XMIT_TIMEO; /* If a packet is taking longer than + this we have other issues */ while ((skb = skb_peek(&sk->sk_write_queue))) { int err = ccid_hc_tx_send_packet(dp->dccps_hc_tx_ccid, sk, skb, @@ -261,8 +261,10 @@ void dccp_write_xmit(struct sock *sk, int block) sk_reset_timer(sk, &dp->dccps_xmit_timer, msecs_to_jiffies(err)+jiffies); break; - } else + } else { err = dccp_wait_for_ccid(sk, skb, &timeo); + timeo = DCCP_XMIT_TIMEO; + } if (err) { printk(KERN_CRIT "%s:err at dccp_wait_for_ccid" " %d\n", __FUNCTION__, err); |