projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Instructions on setting PATH more permanently.
[u/mdw/putty]
/
x11fwd.c
diff --git
a/x11fwd.c
b/x11fwd.c
index
c537f2d
..
7e99523
100644
(file)
--- a/
x11fwd.c
+++ b/
x11fwd.c
@@
-106,6
+106,14
@@
static int x11_verify(char *proto, unsigned char *data, int dlen) {
static int x11_receive (Socket s, int urgent, char *data, int len) {
struct X11Private *pr = (struct X11Private *)sk_get_private_ptr(s);
static int x11_receive (Socket s, int urgent, char *data, int len) {
struct X11Private *pr = (struct X11Private *)sk_get_private_ptr(s);
+ if (urgent==3) {
+ /*
+ * A socket error has occurred. We have no way to
+ * communicate this down the forwarded connection, so we'll
+ * just treat it like a proper close.
+ */
+ len = 0;
+ }
if (!len) {
/* Connection has closed. */
sshfwd_close(pr->c);
if (!len) {
/* Connection has closed. */
sshfwd_close(pr->c);
@@
-121,13
+129,11
@@
static int x11_receive (Socket s, int urgent, char *data, int len) {
*
* Returns an error message, or NULL on success.
* also, fills the SocketsStructure
*
* Returns an error message, or NULL on success.
* also, fills the SocketsStructure
- *
- * Also places the canonical host name into `realhost'.
*/
*/
-char *x11_init (Socket *s, char *display, void *c
, char **realhost
) {
+char *x11_init (Socket *s, char *display, void *c) {
SockAddr addr;
int port;
SockAddr addr;
int port;
- char *err;
+ char *err
, *dummy_realhost
;
char host[128];
int n, displaynum;
struct X11Private *pr;
char host[128];
int n, displaynum;
struct X11Private *pr;
@@
-148,7
+154,7
@@
char *x11_init (Socket *s, char *display, void *c, char **realhost) {
/*
* Try to find host.
*/
/*
* Try to find host.
*/
- addr = sk_namelookup(host, realhost);
+ addr = sk_namelookup(host,
&dummy_
realhost);
if ( (err = sk_addr_error(addr)) )
return err;
if ( (err = sk_addr_error(addr)) )
return err;