summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/channels.c b/channels.c
index f833e1bb9..a18c7e300 100644
--- a/channels.c
+++ b/channels.c
@@ -17,7 +17,7 @@
17 */ 17 */
18 18
19#include "includes.h" 19#include "includes.h"
20RCSID("$Id: channels.c,v 1.29 2000/05/07 02:03:15 damien Exp $"); 20RCSID("$Id: channels.c,v 1.30 2000/05/09 01:02:59 damien Exp $");
21 21
22#include "ssh.h" 22#include "ssh.h"
23#include "packet.h" 23#include "packet.h"
@@ -505,7 +505,10 @@ channel_pre_x11_open(Channel *c, fd_set * readset, fd_set * writeset)
505 int ret = x11_open_helper(c); 505 int ret = x11_open_helper(c);
506 if (ret == 1) { 506 if (ret == 1) {
507 c->type = SSH_CHANNEL_OPEN; 507 c->type = SSH_CHANNEL_OPEN;
508 channel_pre_open_15(c, readset, writeset); 508 if (compat20)
509 channel_pre_open_20(c, readset, writeset);
510 else
511 channel_pre_open_15(c, readset, writeset);
509 } else if (ret == -1) { 512 } else if (ret == -1) {
510 debug("X11 rejected %d i%d/o%d", c->self, c->istate, c->ostate); 513 debug("X11 rejected %d i%d/o%d", c->self, c->istate, c->ostate);
511 chan_read_failed(c); /** force close? */ 514 chan_read_failed(c); /** force close? */
@@ -549,7 +552,11 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset)
549 packet_put_int(c->local_maxpacket); 552 packet_put_int(c->local_maxpacket);
550 /* originator host and port */ 553 /* originator host and port */
551 packet_put_cstring(remote_hostname); 554 packet_put_cstring(remote_hostname);
552 packet_put_int(remote_port); 555 if (datafellows & SSH_BUG_X11FWD) {
556 debug("ssh2 x11 bug compat mode");
557 } else {
558 packet_put_int(remote_port);
559 }
553 packet_send(); 560 packet_send();
554 } else { 561 } else {
555 packet_start(SSH_SMSG_X11_OPEN); 562 packet_start(SSH_SMSG_X11_OPEN);