summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/channels.c b/channels.c
index df56e9496..c842aa231 100644
--- a/channels.c
+++ b/channels.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: channels.c,v 1.69 2000/09/21 11:25:33 markus Exp $"); 43RCSID("$OpenBSD: channels.c,v 1.70 2000/09/28 18:03:18 markus Exp $");
44 44
45#include "ssh.h" 45#include "ssh.h"
46#include "packet.h" 46#include "packet.h"
@@ -234,7 +234,7 @@ channel_new(char *ctype, int type, int rfd, int wfd, int efd,
234 /* There are no free slots. Take last+1 slot and expand the array. */ 234 /* There are no free slots. Take last+1 slot and expand the array. */
235 found = channels_alloc; 235 found = channels_alloc;
236 channels_alloc += 10; 236 channels_alloc += 10;
237 debug("channel: expanding %d", channels_alloc); 237 debug2("channel: expanding %d", channels_alloc);
238 channels = xrealloc(channels, channels_alloc * sizeof(Channel)); 238 channels = xrealloc(channels, channels_alloc * sizeof(Channel));
239 for (i = found; i < channels_alloc; i++) 239 for (i = found; i < channels_alloc; i++)
240 channels[i].type = SSH_CHANNEL_FREE; 240 channels[i].type = SSH_CHANNEL_FREE;
@@ -737,7 +737,7 @@ channel_handle_efd(Channel *c, fd_set * readset, fd_set * writeset)
737 buffer_len(&c->extended) > 0) { 737 buffer_len(&c->extended) > 0) {
738 len = write(c->efd, buffer_ptr(&c->extended), 738 len = write(c->efd, buffer_ptr(&c->extended),
739 buffer_len(&c->extended)); 739 buffer_len(&c->extended));
740 debug("channel %d: written %d to efd %d", 740 debug2("channel %d: written %d to efd %d",
741 c->self, len, c->efd); 741 c->self, len, c->efd);
742 if (len > 0) { 742 if (len > 0) {
743 buffer_consume(&c->extended, len); 743 buffer_consume(&c->extended, len);
@@ -746,7 +746,7 @@ channel_handle_efd(Channel *c, fd_set * readset, fd_set * writeset)
746 } else if (c->extended_usage == CHAN_EXTENDED_READ && 746 } else if (c->extended_usage == CHAN_EXTENDED_READ &&
747 FD_ISSET(c->efd, readset)) { 747 FD_ISSET(c->efd, readset)) {
748 len = read(c->efd, buf, sizeof(buf)); 748 len = read(c->efd, buf, sizeof(buf));
749 debug("channel %d: read %d from efd %d", 749 debug2("channel %d: read %d from efd %d",
750 c->self, len, c->efd); 750 c->self, len, c->efd);
751 if (len == 0) { 751 if (len == 0) {
752 debug("channel %d: closing efd %d", 752 debug("channel %d: closing efd %d",
@@ -769,7 +769,7 @@ channel_check_window(Channel *c, fd_set * readset, fd_set * writeset)
769 packet_put_int(c->remote_id); 769 packet_put_int(c->remote_id);
770 packet_put_int(c->local_consumed); 770 packet_put_int(c->local_consumed);
771 packet_send(); 771 packet_send();
772 debug("channel %d: window %d sent adjust %d", 772 debug2("channel %d: window %d sent adjust %d",
773 c->self, c->local_window, 773 c->self, c->local_window,
774 c->local_consumed); 774 c->local_consumed);
775 c->local_window += c->local_consumed; 775 c->local_window += c->local_consumed;
@@ -1076,7 +1076,7 @@ channel_input_extended_data(int type, int plen, void *ctxt)
1076 xfree(data); 1076 xfree(data);
1077 return; 1077 return;
1078 } 1078 }
1079 debug("channel %d: rcvd ext data %d", c->self, data_len); 1079 debug2("channel %d: rcvd ext data %d", c->self, data_len);
1080 c->local_window -= data_len; 1080 c->local_window -= data_len;
1081 buffer_append(&c->extended, data, data_len); 1081 buffer_append(&c->extended, data, data_len);
1082 xfree(data); 1082 xfree(data);
@@ -1218,9 +1218,9 @@ channel_input_open_confirmation(int type, int plen, void *ctxt)
1218 c->remote_maxpacket = packet_get_int(); 1218 c->remote_maxpacket = packet_get_int();
1219 packet_done(); 1219 packet_done();
1220 if (c->cb_fn != NULL && c->cb_event == type) { 1220 if (c->cb_fn != NULL && c->cb_event == type) {
1221 debug("callback start"); 1221 debug2("callback start");
1222 c->cb_fn(c->self, c->cb_arg); 1222 c->cb_fn(c->self, c->cb_arg);
1223 debug("callback done"); 1223 debug2("callback done");
1224 } 1224 }
1225 debug("channel %d: open confirm rwindow %d rmax %d", c->self, 1225 debug("channel %d: open confirm rwindow %d rmax %d", c->self,
1226 c->remote_window, c->remote_maxpacket); 1226 c->remote_window, c->remote_maxpacket);
@@ -1269,13 +1269,13 @@ channel_input_channel_request(int type, int plen, void *ctxt)
1269 packet_disconnect("Received request for " 1269 packet_disconnect("Received request for "
1270 "non-open channel %d.", id); 1270 "non-open channel %d.", id);
1271 if (c->cb_fn != NULL && c->cb_event == type) { 1271 if (c->cb_fn != NULL && c->cb_event == type) {
1272 debug("callback start"); 1272 debug2("callback start");
1273 c->cb_fn(c->self, c->cb_arg); 1273 c->cb_fn(c->self, c->cb_arg);
1274 debug("callback done"); 1274 debug2("callback done");
1275 } else { 1275 } else {
1276 char *service = packet_get_string(NULL); 1276 char *service = packet_get_string(NULL);
1277 debug("channel: %d rcvd request for %s", c->self, service); 1277 debug("channel: %d rcvd request for %s", c->self, service);
1278debug("cb_fn %p cb_event %d", c->cb_fn , c->cb_event); 1278 debug("cb_fn %p cb_event %d", c->cb_fn , c->cb_event);
1279 xfree(service); 1279 xfree(service);
1280 } 1280 }
1281} 1281}
@@ -1300,7 +1300,7 @@ channel_input_window_adjust(int type, int plen, void *ctxt)
1300 } 1300 }
1301 adjust = packet_get_int(); 1301 adjust = packet_get_int();
1302 packet_done(); 1302 packet_done();
1303 debug("channel %d: rcvd adjust %d", id, adjust); 1303 debug2("channel %d: rcvd adjust %d", id, adjust);
1304 c->remote_window += adjust; 1304 c->remote_window += adjust;
1305} 1305}
1306 1306