diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-05-08 20:07:39 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-05-08 20:07:39 +0000 |
commit | 69128668938c82e8d428e77726ef00b2b6f799b9 (patch) | |
tree | 1ee834a896b297768505ea963c1ed318dae3efdc /serverloop.c | |
parent | e487d84e03615256aca61431bb9b515db8c2b6e6 (diff) |
- markus@cvs.openbsd.org 2001/05/08 19:17:31
[channels.c serverloop.c]
adds correct error reporting to async connect()s
fixes the server-discards-data-before-connected-bug found by
onoe@sm.sony.co.jp
Diffstat (limited to 'serverloop.c')
-rw-r--r-- | serverloop.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/serverloop.c b/serverloop.c index 5b3135564..6a5f40c4b 100644 --- a/serverloop.c +++ b/serverloop.c | |||
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: serverloop.c,v 1.64 2001/05/04 23:47:34 markus Exp $"); | 38 | RCSID("$OpenBSD: serverloop.c,v 1.65 2001/05/08 19:17:31 markus Exp $"); |
39 | 39 | ||
40 | #include "xmalloc.h" | 40 | #include "xmalloc.h" |
41 | #include "packet.h" | 41 | #include "packet.h" |
@@ -890,20 +890,21 @@ server_input_channel_open(int type, int plen, void *ctxt) | |||
890 | c->remote_id = rchan; | 890 | c->remote_id = rchan; |
891 | c->remote_window = rwindow; | 891 | c->remote_window = rwindow; |
892 | c->remote_maxpacket = rmaxpack; | 892 | c->remote_maxpacket = rmaxpack; |
893 | 893 | if (c->type != SSH_CHANNEL_CONNECTING) { | |
894 | packet_start(SSH2_MSG_CHANNEL_OPEN_CONFIRMATION); | 894 | packet_start(SSH2_MSG_CHANNEL_OPEN_CONFIRMATION); |
895 | packet_put_int(c->remote_id); | 895 | packet_put_int(c->remote_id); |
896 | packet_put_int(c->self); | 896 | packet_put_int(c->self); |
897 | packet_put_int(c->local_window); | 897 | packet_put_int(c->local_window); |
898 | packet_put_int(c->local_maxpacket); | 898 | packet_put_int(c->local_maxpacket); |
899 | packet_send(); | 899 | packet_send(); |
900 | } | ||
900 | } else { | 901 | } else { |
901 | debug("server_input_channel_open: failure %s", ctype); | 902 | debug("server_input_channel_open: failure %s", ctype); |
902 | packet_start(SSH2_MSG_CHANNEL_OPEN_FAILURE); | 903 | packet_start(SSH2_MSG_CHANNEL_OPEN_FAILURE); |
903 | packet_put_int(rchan); | 904 | packet_put_int(rchan); |
904 | packet_put_int(SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED); | 905 | packet_put_int(SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED); |
905 | if (!(datafellows & SSH_BUG_OPENFAILURE)) { | 906 | if (!(datafellows & SSH_BUG_OPENFAILURE)) { |
906 | packet_put_cstring("bla bla"); | 907 | packet_put_cstring("open failed"); |
907 | packet_put_cstring(""); | 908 | packet_put_cstring(""); |
908 | } | 909 | } |
909 | packet_send(); | 910 | packet_send(); |