summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-06-25 23:17:36 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-06-25 23:17:36 +0000
commit4fed2be856c2677c4b92825dfcfcbb178c241a8c (patch)
tree1a3bf6c31c0d08a5af67ded3d4e15c3d8b9374ce
parentb48057b7dca215efab35ab5a273ae7834f24953a (diff)
- markus@cvs.openbsd.org 2002/06/24 14:33:27
[channels.c channels.h clientloop.c serverloop.c] move channel counter to u_int
-rw-r--r--ChangeLog5
-rw-r--r--channels.c16
-rw-r--r--channels.h16
-rw-r--r--clientloop.c6
-rw-r--r--serverloop.c6
5 files changed, 25 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index 70dfe5f7e..ce70a55ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,9 @@
7 - markus@cvs.openbsd.org 2002/06/24 13:12:23 7 - markus@cvs.openbsd.org 2002/06/24 13:12:23
8 [ssh-agent.1] 8 [ssh-agent.1]
9 the socket name contains ssh-agent's ppid; via mpech@ from form@ 9 the socket name contains ssh-agent's ppid; via mpech@ from form@
10 - markus@cvs.openbsd.org 2002/06/24 14:33:27
11 [channels.c channels.h clientloop.c serverloop.c]
12 move channel counter to u_int
10 13
1120020625 1420020625
12 - (stevesk) [INSTALL acconfig.h configure.ac defines.h] remove --with-rsh 15 - (stevesk) [INSTALL acconfig.h configure.ac defines.h] remove --with-rsh
@@ -1106,4 +1109,4 @@
1106 - (stevesk) entropy.c: typo in debug message 1109 - (stevesk) entropy.c: typo in debug message
1107 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 1110 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
1108 1111
1109$Id: ChangeLog,v 1.2275 2002/06/25 23:16:31 mouring Exp $ 1112$Id: ChangeLog,v 1.2276 2002/06/25 23:17:36 mouring Exp $
diff --git a/channels.c b/channels.c
index fede9eb93..c22e5695c 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: channels.c,v 1.177 2002/06/23 21:34:07 markus Exp $"); 42RCSID("$OpenBSD: channels.c,v 1.178 2002/06/24 14:33:27 markus Exp $");
43 43
44#include "ssh.h" 44#include "ssh.h"
45#include "ssh1.h" 45#include "ssh1.h"
@@ -205,7 +205,7 @@ channel_register_fds(Channel *c, int rfd, int wfd, int efd,
205 205
206Channel * 206Channel *
207channel_new(char *ctype, int type, int rfd, int wfd, int efd, 207channel_new(char *ctype, int type, int rfd, int wfd, int efd,
208 int window, int maxpack, int extusage, char *remote_name, int nonblock) 208 u_int window, u_int maxpack, int extusage, char *remote_name, int nonblock)
209{ 209{
210 int i, found; 210 int i, found;
211 Channel *c; 211 Channel *c;
@@ -1568,8 +1568,9 @@ channel_after_select(fd_set * readset, fd_set * writeset)
1568void 1568void
1569channel_output_poll(void) 1569channel_output_poll(void)
1570{ 1570{
1571 int len, i;
1572 Channel *c; 1571 Channel *c;
1572 int i;
1573 u_int len;
1573 1574
1574 for (i = 0; i < channels_alloc; i++) { 1575 for (i = 0; i < channels_alloc; i++) {
1575 c = channels[i]; 1576 c = channels[i];
@@ -1647,7 +1648,7 @@ channel_output_poll(void)
1647 c->remote_window > 0 && 1648 c->remote_window > 0 &&
1648 (len = buffer_len(&c->extended)) > 0 && 1649 (len = buffer_len(&c->extended)) > 0 &&
1649 c->extended_usage == CHAN_EXTENDED_READ) { 1650 c->extended_usage == CHAN_EXTENDED_READ) {
1650 debug2("channel %d: rwin %d elen %d euse %d", 1651 debug2("channel %d: rwin %u elen %u euse %d",
1651 c->self, c->remote_window, buffer_len(&c->extended), 1652 c->self, c->remote_window, buffer_len(&c->extended),
1652 c->extended_usage); 1653 c->extended_usage);
1653 if (len > c->remote_window) 1654 if (len > c->remote_window)
@@ -1873,7 +1874,7 @@ channel_input_open_confirmation(int type, u_int32_t seq, void *ctxt)
1873 c->confirm(c->self, NULL); 1874 c->confirm(c->self, NULL);
1874 debug2("callback done"); 1875 debug2("callback done");
1875 } 1876 }
1876 debug("channel %d: open confirm rwindow %d rmax %d", c->self, 1877 debug("channel %d: open confirm rwindow %u rmax %u", c->self,
1877 c->remote_window, c->remote_maxpacket); 1878 c->remote_window, c->remote_maxpacket);
1878 } 1879 }
1879 packet_check_eom(); 1880 packet_check_eom();
@@ -1930,7 +1931,8 @@ void
1930channel_input_window_adjust(int type, u_int32_t seq, void *ctxt) 1931channel_input_window_adjust(int type, u_int32_t seq, void *ctxt)
1931{ 1932{
1932 Channel *c; 1933 Channel *c;
1933 int id, adjust; 1934 int id;
1935 u_int adjust;
1934 1936
1935 if (!compat20) 1937 if (!compat20)
1936 return; 1938 return;
@@ -1946,7 +1948,7 @@ channel_input_window_adjust(int type, u_int32_t seq, void *ctxt)
1946 } 1948 }
1947 adjust = packet_get_int(); 1949 adjust = packet_get_int();
1948 packet_check_eom(); 1950 packet_check_eom();
1949 debug2("channel %d: rcvd adjust %d", id, adjust); 1951 debug2("channel %d: rcvd adjust %u", id, adjust);
1950 c->remote_window += adjust; 1952 c->remote_window += adjust;
1951} 1953}
1952 1954
diff --git a/channels.h b/channels.h
index 64f6c41fa..dd54114d6 100644
--- a/channels.h
+++ b/channels.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.h,v 1.69 2002/06/23 21:06:41 deraadt Exp $ */ 1/* $OpenBSD: channels.h,v 1.70 2002/06/24 14:33:27 markus Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -90,12 +90,12 @@ struct Channel {
90 int host_port; /* remote port to connect for forwards */ 90 int host_port; /* remote port to connect for forwards */
91 char *remote_name; /* remote hostname */ 91 char *remote_name; /* remote hostname */
92 92
93 int remote_window; 93 u_int remote_window;
94 int remote_maxpacket; 94 u_int remote_maxpacket;
95 int local_window; 95 u_int local_window;
96 int local_window_max; 96 u_int local_window_max;
97 int local_consumed; 97 u_int local_consumed;
98 int local_maxpacket; 98 u_int local_maxpacket;
99 int extended_usage; 99 int extended_usage;
100 int single_connection; 100 int single_connection;
101 101
@@ -151,7 +151,7 @@ struct Channel {
151/* channel management */ 151/* channel management */
152 152
153Channel *channel_lookup(int); 153Channel *channel_lookup(int);
154Channel *channel_new(char *, int, int, int, int, int, int, int, char *, int); 154Channel *channel_new(char *, int, int, int, int, u_int, u_int, int, char *, int);
155void channel_set_fds(int, int, int, int, int, int, u_int); 155void channel_set_fds(int, int, int, int, int, int, u_int);
156void channel_free(Channel *); 156void channel_free(Channel *);
157void channel_free_all(void); 157void channel_free_all(void);
diff --git a/clientloop.c b/clientloop.c
index 75d24ace2..cd2eab77a 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -59,7 +59,7 @@
59 */ 59 */
60 60
61#include "includes.h" 61#include "includes.h"
62RCSID("$OpenBSD: clientloop.c,v 1.101 2002/06/09 13:32:01 markus Exp $"); 62RCSID("$OpenBSD: clientloop.c,v 1.102 2002/06/24 14:33:27 markus Exp $");
63 63
64#include "ssh.h" 64#include "ssh.h"
65#include "ssh1.h" 65#include "ssh1.h"
@@ -1208,10 +1208,8 @@ client_input_channel_open(int type, u_int32_t seq, void *ctxt)
1208{ 1208{
1209 Channel *c = NULL; 1209 Channel *c = NULL;
1210 char *ctype; 1210 char *ctype;
1211 u_int len;
1212 int rchan; 1211 int rchan;
1213 int rmaxpack; 1212 u_int rmaxpack, rwindow, len;
1214 int rwindow;
1215 1213
1216 ctype = packet_get_string(&len); 1214 ctype = packet_get_string(&len);
1217 rchan = packet_get_int(); 1215 rchan = packet_get_int();
diff --git a/serverloop.c b/serverloop.c
index 1a148fcbe..134921355 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: serverloop.c,v 1.102 2002/06/11 05:46:20 mpech Exp $"); 38RCSID("$OpenBSD: serverloop.c,v 1.103 2002/06/24 14:33:27 markus Exp $");
39 39
40#include "xmalloc.h" 40#include "xmalloc.h"
41#include "packet.h" 41#include "packet.h"
@@ -902,10 +902,8 @@ server_input_channel_open(int type, u_int32_t seq, void *ctxt)
902{ 902{
903 Channel *c = NULL; 903 Channel *c = NULL;
904 char *ctype; 904 char *ctype;
905 u_int len;
906 int rchan; 905 int rchan;
907 int rmaxpack; 906 u_int rmaxpack, rwindow, len;
908 int rwindow;
909 907
910 ctype = packet_get_string(&len); 908 ctype = packet_get_string(&len);
911 rchan = packet_get_int(); 909 rchan = packet_get_int();