diff options
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/channels.c b/channels.c index 9f042d44e..163312c57 100644 --- a/channels.c +++ b/channels.c | |||
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: channels.c,v 1.151 2001/12/27 20:39:58 markus Exp $"); | 42 | RCSID("$OpenBSD: channels.c,v 1.152 2001/12/28 12:14:27 markus Exp $"); |
43 | 43 | ||
44 | #include "ssh.h" | 44 | #include "ssh.h" |
45 | #include "ssh1.h" | 45 | #include "ssh1.h" |
@@ -1748,7 +1748,7 @@ channel_input_data(int type, int plen, u_int32_t seq, void *ctxt) | |||
1748 | } | 1748 | } |
1749 | c->local_window -= data_len; | 1749 | c->local_window -= data_len; |
1750 | } | 1750 | } |
1751 | packet_done(); | 1751 | packet_check_eom(); |
1752 | buffer_append(&c->output, data, data_len); | 1752 | buffer_append(&c->output, data, data_len); |
1753 | xfree(data); | 1753 | xfree(data); |
1754 | } | 1754 | } |
@@ -1780,7 +1780,7 @@ channel_input_extended_data(int type, int plen, u_int32_t seq, void *ctxt) | |||
1780 | return; | 1780 | return; |
1781 | } | 1781 | } |
1782 | data = packet_get_string(&data_len); | 1782 | data = packet_get_string(&data_len); |
1783 | packet_done(); | 1783 | packet_check_eom(); |
1784 | if (data_len > c->local_window) { | 1784 | if (data_len > c->local_window) { |
1785 | log("channel %d: rcvd too much extended_data %d, win %d", | 1785 | log("channel %d: rcvd too much extended_data %d, win %d", |
1786 | c->self, data_len, c->local_window); | 1786 | c->self, data_len, c->local_window); |
@@ -1800,7 +1800,7 @@ channel_input_ieof(int type, int plen, u_int32_t seq, void *ctxt) | |||
1800 | Channel *c; | 1800 | Channel *c; |
1801 | 1801 | ||
1802 | id = packet_get_int(); | 1802 | id = packet_get_int(); |
1803 | packet_done(); | 1803 | packet_check_eom(); |
1804 | c = channel_lookup(id); | 1804 | c = channel_lookup(id); |
1805 | if (c == NULL) | 1805 | if (c == NULL) |
1806 | packet_disconnect("Received ieof for nonexistent channel %d.", id); | 1806 | packet_disconnect("Received ieof for nonexistent channel %d.", id); |
@@ -1821,7 +1821,7 @@ channel_input_close(int type, int plen, u_int32_t seq, void *ctxt) | |||
1821 | Channel *c; | 1821 | Channel *c; |
1822 | 1822 | ||
1823 | id = packet_get_int(); | 1823 | id = packet_get_int(); |
1824 | packet_done(); | 1824 | packet_check_eom(); |
1825 | c = channel_lookup(id); | 1825 | c = channel_lookup(id); |
1826 | if (c == NULL) | 1826 | if (c == NULL) |
1827 | packet_disconnect("Received close for nonexistent channel %d.", id); | 1827 | packet_disconnect("Received close for nonexistent channel %d.", id); |
@@ -1858,7 +1858,7 @@ channel_input_oclose(int type, int plen, u_int32_t seq, void *ctxt) | |||
1858 | int id = packet_get_int(); | 1858 | int id = packet_get_int(); |
1859 | Channel *c = channel_lookup(id); | 1859 | Channel *c = channel_lookup(id); |
1860 | 1860 | ||
1861 | packet_done(); | 1861 | packet_check_eom(); |
1862 | if (c == NULL) | 1862 | if (c == NULL) |
1863 | packet_disconnect("Received oclose for nonexistent channel %d.", id); | 1863 | packet_disconnect("Received oclose for nonexistent channel %d.", id); |
1864 | chan_rcvd_oclose(c); | 1864 | chan_rcvd_oclose(c); |
@@ -1870,7 +1870,7 @@ channel_input_close_confirmation(int type, int plen, u_int32_t seq, void *ctxt) | |||
1870 | int id = packet_get_int(); | 1870 | int id = packet_get_int(); |
1871 | Channel *c = channel_lookup(id); | 1871 | Channel *c = channel_lookup(id); |
1872 | 1872 | ||
1873 | packet_done(); | 1873 | packet_check_eom(); |
1874 | if (c == NULL) | 1874 | if (c == NULL) |
1875 | packet_disconnect("Received close confirmation for " | 1875 | packet_disconnect("Received close confirmation for " |
1876 | "out-of-range channel %d.", id); | 1876 | "out-of-range channel %d.", id); |
@@ -1908,7 +1908,7 @@ channel_input_open_confirmation(int type, int plen, u_int32_t seq, void *ctxt) | |||
1908 | debug("channel %d: open confirm rwindow %d rmax %d", c->self, | 1908 | debug("channel %d: open confirm rwindow %d rmax %d", c->self, |
1909 | c->remote_window, c->remote_maxpacket); | 1909 | c->remote_window, c->remote_maxpacket); |
1910 | } | 1910 | } |
1911 | packet_done(); | 1911 | packet_check_eom(); |
1912 | } | 1912 | } |
1913 | 1913 | ||
1914 | static char * | 1914 | static char * |
@@ -1953,7 +1953,7 @@ channel_input_open_failure(int type, int plen, u_int32_t seq, void *ctxt) | |||
1953 | if (lang != NULL) | 1953 | if (lang != NULL) |
1954 | xfree(lang); | 1954 | xfree(lang); |
1955 | } | 1955 | } |
1956 | packet_done(); | 1956 | packet_check_eom(); |
1957 | /* Free the channel. This will also close the socket. */ | 1957 | /* Free the channel. This will also close the socket. */ |
1958 | channel_free(c); | 1958 | channel_free(c); |
1959 | } | 1959 | } |
@@ -2002,7 +2002,7 @@ channel_input_window_adjust(int type, int plen, u_int32_t seq, void *ctxt) | |||
2002 | return; | 2002 | return; |
2003 | } | 2003 | } |
2004 | adjust = packet_get_int(); | 2004 | adjust = packet_get_int(); |
2005 | packet_done(); | 2005 | packet_check_eom(); |
2006 | debug2("channel %d: rcvd adjust %d", id, adjust); | 2006 | debug2("channel %d: rcvd adjust %d", id, adjust); |
2007 | c->remote_window += adjust; | 2007 | c->remote_window += adjust; |
2008 | } | 2008 | } |
@@ -2024,7 +2024,7 @@ channel_input_port_open(int type, int plen, u_int32_t seq, void *ctxt) | |||
2024 | } else { | 2024 | } else { |
2025 | originator_string = xstrdup("unknown (remote did not supply name)"); | 2025 | originator_string = xstrdup("unknown (remote did not supply name)"); |
2026 | } | 2026 | } |
2027 | packet_done(); | 2027 | packet_check_eom(); |
2028 | sock = channel_connect_to(host, host_port); | 2028 | sock = channel_connect_to(host, host_port); |
2029 | if (sock != -1) { | 2029 | if (sock != -1) { |
2030 | c = channel_new("connected socket", | 2030 | c = channel_new("connected socket", |
@@ -2630,7 +2630,7 @@ x11_input_open(int type, int plen, u_int32_t seq, void *ctxt) | |||
2630 | } else { | 2630 | } else { |
2631 | remote_host = xstrdup("unknown (remote did not supply name)"); | 2631 | remote_host = xstrdup("unknown (remote did not supply name)"); |
2632 | } | 2632 | } |
2633 | packet_done(); | 2633 | packet_check_eom(); |
2634 | 2634 | ||
2635 | /* Obtain a connection to the real X display. */ | 2635 | /* Obtain a connection to the real X display. */ |
2636 | sock = x11_connect_display(); | 2636 | sock = x11_connect_display(); |
@@ -2881,7 +2881,7 @@ auth_input_open_request(int type, int plen, u_int32_t seq, void *ctxt) | |||
2881 | 2881 | ||
2882 | /* Read the remote channel number from the message. */ | 2882 | /* Read the remote channel number from the message. */ |
2883 | remote_id = packet_get_int(); | 2883 | remote_id = packet_get_int(); |
2884 | packet_done(); | 2884 | packet_check_eom(); |
2885 | 2885 | ||
2886 | /* | 2886 | /* |
2887 | * Get a connection to the local authentication agent (this may again | 2887 | * Get a connection to the local authentication agent (this may again |