af_netrom.c (62910554656cdcd6b6f84a5154c4155aae4ca231) | af_netrom.c (aa395145165cb06a0d0885221bbe0ce4a564391d) |
---|---|
1/* 2 * This program is free software; you can redistribute it and/or modify 3 * it under the terms of the GNU General Public License as published by 4 * the Free Software Foundation; either version 2 of the License, or 5 * (at your option) any later version. 6 * 7 * Copyright Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) 8 * Copyright Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk) --- 725 unchanged lines hidden (view full) --- 734 /* 735 * A Connect Ack with Choke or timeout or failed routing will go to 736 * closed. 737 */ 738 if (sk->sk_state == TCP_SYN_SENT) { 739 DEFINE_WAIT(wait); 740 741 for (;;) { | 1/* 2 * This program is free software; you can redistribute it and/or modify 3 * it under the terms of the GNU General Public License as published by 4 * the Free Software Foundation; either version 2 of the License, or 5 * (at your option) any later version. 6 * 7 * Copyright Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) 8 * Copyright Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk) --- 725 unchanged lines hidden (view full) --- 734 /* 735 * A Connect Ack with Choke or timeout or failed routing will go to 736 * closed. 737 */ 738 if (sk->sk_state == TCP_SYN_SENT) { 739 DEFINE_WAIT(wait); 740 741 for (;;) { |
742 prepare_to_wait(sk->sk_sleep, &wait, | 742 prepare_to_wait(sk_sleep(sk), &wait, |
743 TASK_INTERRUPTIBLE); 744 if (sk->sk_state != TCP_SYN_SENT) 745 break; 746 if (!signal_pending(current)) { 747 release_sock(sk); 748 schedule(); 749 lock_sock(sk); 750 continue; 751 } 752 err = -ERESTARTSYS; 753 break; 754 } | 743 TASK_INTERRUPTIBLE); 744 if (sk->sk_state != TCP_SYN_SENT) 745 break; 746 if (!signal_pending(current)) { 747 release_sock(sk); 748 schedule(); 749 lock_sock(sk); 750 continue; 751 } 752 err = -ERESTARTSYS; 753 break; 754 } |
755 finish_wait(sk->sk_sleep, &wait); | 755 finish_wait(sk_sleep(sk), &wait); |
756 if (err) 757 goto out_release; 758 } 759 760 if (sk->sk_state != TCP_ESTABLISHED) { 761 sock->state = SS_UNCONNECTED; 762 err = sock_error(sk); /* Always set at this point */ 763 goto out_release; --- 29 unchanged lines hidden (view full) --- 793 goto out_release; 794 } 795 796 /* 797 * The write queue this time is holding sockets ready to use 798 * hooked into the SABM we saved 799 */ 800 for (;;) { | 756 if (err) 757 goto out_release; 758 } 759 760 if (sk->sk_state != TCP_ESTABLISHED) { 761 sock->state = SS_UNCONNECTED; 762 err = sock_error(sk); /* Always set at this point */ 763 goto out_release; --- 29 unchanged lines hidden (view full) --- 793 goto out_release; 794 } 795 796 /* 797 * The write queue this time is holding sockets ready to use 798 * hooked into the SABM we saved 799 */ 800 for (;;) { |
801 prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); | 801 prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
802 skb = skb_dequeue(&sk->sk_receive_queue); 803 if (skb) 804 break; 805 806 if (flags & O_NONBLOCK) { 807 err = -EWOULDBLOCK; 808 break; 809 } 810 if (!signal_pending(current)) { 811 release_sock(sk); 812 schedule(); 813 lock_sock(sk); 814 continue; 815 } 816 err = -ERESTARTSYS; 817 break; 818 } | 802 skb = skb_dequeue(&sk->sk_receive_queue); 803 if (skb) 804 break; 805 806 if (flags & O_NONBLOCK) { 807 err = -EWOULDBLOCK; 808 break; 809 } 810 if (!signal_pending(current)) { 811 release_sock(sk); 812 schedule(); 813 lock_sock(sk); 814 continue; 815 } 816 err = -ERESTARTSYS; 817 break; 818 } |
819 finish_wait(sk->sk_sleep, &wait); | 819 finish_wait(sk_sleep(sk), &wait); |
820 if (err) 821 goto out_release; 822 823 newsk = skb->sk; 824 sock_graft(newsk, newsock); 825 826 /* Now attach up the new socket */ 827 kfree_skb(skb); --- 692 unchanged lines hidden --- | 820 if (err) 821 goto out_release; 822 823 newsk = skb->sk; 824 sock_graft(newsk, newsock); 825 826 /* Now attach up the new socket */ 827 kfree_skb(skb); --- 692 unchanged lines hidden --- |