proto.c (9938b04472d5c59f8bd8152a548533a8599596a2) proto.c (346da62cc186c4b4b1ac59f87f4482b47a047388)
1/*
2 * net/dccp/proto.c
3 *
4 * An implementation of the DCCP protocol
5 * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as

--- 995 unchanged lines hidden (view full) ---

1004 * descriptor close, not protocol-sourced closes, because the
1005 *reader process may not have drained the data yet!
1006 */
1007 while ((skb = __skb_dequeue(&sk->sk_receive_queue)) != NULL) {
1008 data_was_unread += skb->len;
1009 __kfree_skb(skb);
1010 }
1011
1/*
2 * net/dccp/proto.c
3 *
4 * An implementation of the DCCP protocol
5 * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as

--- 995 unchanged lines hidden (view full) ---

1004 * descriptor close, not protocol-sourced closes, because the
1005 *reader process may not have drained the data yet!
1006 */
1007 while ((skb = __skb_dequeue(&sk->sk_receive_queue)) != NULL) {
1008 data_was_unread += skb->len;
1009 __kfree_skb(skb);
1010 }
1011
1012 /* If socket has been already reset kill it. */
1013 if (sk->sk_state == DCCP_CLOSED)
1014 goto adjudge_to_death;
1015
1012 if (data_was_unread) {
1013 /* Unread data was tossed, send an appropriate Reset Code */
1014 DCCP_WARN("ABORT with %u bytes unread\n", data_was_unread);
1015 dccp_send_reset(sk, DCCP_RESET_CODE_ABORTED);
1016 dccp_set_state(sk, DCCP_CLOSED);
1017 } else if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) {
1018 /* Check zero linger _after_ checking for unread data. */
1019 sk->sk_prot->disconnect(sk, 0);

--- 233 unchanged lines hidden ---
1016 if (data_was_unread) {
1017 /* Unread data was tossed, send an appropriate Reset Code */
1018 DCCP_WARN("ABORT with %u bytes unread\n", data_was_unread);
1019 dccp_send_reset(sk, DCCP_RESET_CODE_ABORTED);
1020 dccp_set_state(sk, DCCP_CLOSED);
1021 } else if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) {
1022 /* Check zero linger _after_ checking for unread data. */
1023 sk->sk_prot->disconnect(sk, 0);

--- 233 unchanged lines hidden ---