summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authormouring <mouring>2002-06-23 21:48:28 +0000
committermouring <mouring>2002-06-23 21:48:28 +0000
commit5fe1c9138ac676524c42c9324b8a7cbf44c91d1e (patch)
tree688d4eebd598bdaa202e0bea4ac930f7809720bf /session.c
parent1cf4807af40080708ab488f4341ad5377e31e741 (diff)
downloadopenssh-5fe1c9138ac676524c42c9324b8a7cbf44c91d1e.tar.gz
- deraadt@cvs.openbsd.org 2002/06/23 21:06:41
[channels.c channels.h session.c session.h] display, screen, row, col, xpixel, ypixel are u_int; markus ok - (bal) Also fixed IPADDR_IN_DISPLAY case where display, screen, row, col, xpixel are u_int.
Diffstat (limited to 'session.c')
-rw-r--r--session.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/session.c b/session.c
index fab66d6b..9abe028b 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.139 2002/06/23 20:39:45 deraadt Exp $");
+RCSID("$OpenBSD: session.c,v 1.140 2002/06/23 21:06:41 deraadt Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -1970,9 +1970,9 @@ session_setup_x11fwd(Session *s)
debug("X11 display already set.");
return 0;
}
- s->display_number = x11_create_display_inet(options.x11_display_offset,
- options.x11_use_localhost, s->single_connection);
- if (s->display_number == -1) {
+ if (x11_create_display_inet(options.x11_display_offset,
+ options.x11_use_localhost, s->single_connection,
+ &s->display_number) == -1) {
debug("x11_create_display_inet failed.");
return 0;
}
@@ -1986,9 +1986,9 @@ session_setup_x11fwd(Session *s)
* different than the DISPLAY string for localhost displays.
*/
if (options.x11_use_localhost) {
- snprintf(display, sizeof display, "localhost:%d.%d",
+ snprintf(display, sizeof display, "localhost:%u.%u",
s->display_number, s->screen);
- snprintf(auth_display, sizeof auth_display, "unix:%d.%d",
+ snprintf(auth_display, sizeof auth_display, "unix:%u.%u",
s->display_number, s->screen);
s->display = xstrdup(display);
s->auth_display = xstrdup(auth_display);
@@ -2004,10 +2004,10 @@ session_setup_x11fwd(Session *s)
return 0;
}
memcpy(&my_addr, he->h_addr_list[0], sizeof(struct in_addr));
- snprintf(display, sizeof display, "%.50s:%d.%d", inet_ntoa(my_addr),
+ snprintf(display, sizeof display, "%.50s:%u.%u", inet_ntoa(my_addr),
s->display_number, s->screen);
#else
- snprintf(display, sizeof display, "%.400s:%d.%d", hostname,
+ snprintf(display, sizeof display, "%.400s:%u.%u", hostname,
s->display_number, s->screen);
#endif
s->display = xstrdup(display);