aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/output.c
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2006-11-20 15:39:23 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:24:38 -0500
commit59348b19efebfd6a8d0791ff81d207b16594c94b (patch)
treea9212a7bf62bd594cf02d23b9e33eb45a46d414d /net/dccp/output.c
parentb1308dc015eb09cf094ca169296738a13ae049ad (diff)
[DCCP]: Simplified conditions due to use of enum:8 states
This reaps the benefit of the earlier patch, which changed the type of CCID 3 states to use enums, in that many conditions are now simplified and the number of possible (unexpected) values is greatly reduced. In a few instances, this also allowed to simplify pre-conditions; where care has been taken to retain logical equivalence. [DCCP]: Introduce a consistent BUG/WARN message scheme This refines the existing set of DCCP messages so that * BUG(), BUG_ON(), WARN_ON() have meaningful DCCP-specific counterparts * DCCP_CRIT (for severe warnings) is not rate-limited * DCCP_WARN() is introduced as rate-limited wrapper Using these allows a faster and cleaner transition to their original counterparts once the code has matured into a full DCCP implementation. 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.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c
index c34eada7f025..bfd9c5757897 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -257,11 +257,8 @@ void dccp_write_xmit(struct sock *sk, int block)
257 err = dccp_wait_for_ccid(sk, skb, &timeo); 257 err = dccp_wait_for_ccid(sk, skb, &timeo);
258 timeo = DCCP_XMIT_TIMEO; 258 timeo = DCCP_XMIT_TIMEO;
259 } 259 }
260 if (err) { 260 if (err)
261 printk(KERN_CRIT "%s:err at dccp_wait_for_ccid" 261 DCCP_BUG("err=%d after dccp_wait_for_ccid", err);
262 " %d\n", __FUNCTION__, err);
263 dump_stack();
264 }
265 } 262 }
266 263
267 skb_dequeue(&sk->sk_write_queue); 264 skb_dequeue(&sk->sk_write_queue);
@@ -283,12 +280,9 @@ void dccp_write_xmit(struct sock *sk, int block)
283 280
284 err = dccp_transmit_skb(sk, skb); 281 err = dccp_transmit_skb(sk, skb);
285 ccid_hc_tx_packet_sent(dp->dccps_hc_tx_ccid, sk, 0, len); 282 ccid_hc_tx_packet_sent(dp->dccps_hc_tx_ccid, sk, 0, len);
286 if (err) { 283 if (err)
287 printk(KERN_CRIT "%s:err from " 284 DCCP_BUG("err=%d after ccid_hc_tx_packet_sent",
288 "ccid_hc_tx_packet_sent %d\n", 285 err);
289 __FUNCTION__, err);
290 dump_stack();
291 }
292 } else 286 } else
293 kfree(skb); 287 kfree(skb);
294 } 288 }