summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-06-23 21:48:28 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-06-23 21:48:28 +0000
commita9d2c89fc5e9feb9da7326e2fdaf3281184620ab (patch)
tree5aa1c559cb3bcb4905a6b79a92f70935b3de57e4 /session.c
parent8ada5d0d0daabc238b86dab64066353937ff22e8 (diff)
- 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 fab66d6b7..9abe028b0 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.139 2002/06/23 20:39:45 deraadt Exp $"); 36RCSID("$OpenBSD: session.c,v 1.140 2002/06/23 21:06:41 deraadt Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -1970,9 +1970,9 @@ session_setup_x11fwd(Session *s)
1970 debug("X11 display already set."); 1970 debug("X11 display already set.");
1971 return 0; 1971 return 0;
1972 } 1972 }
1973 s->display_number = x11_create_display_inet(options.x11_display_offset, 1973 if (x11_create_display_inet(options.x11_display_offset,
1974 options.x11_use_localhost, s->single_connection); 1974 options.x11_use_localhost, s->single_connection,
1975 if (s->display_number == -1) { 1975 &s->display_number) == -1) {
1976 debug("x11_create_display_inet failed."); 1976 debug("x11_create_display_inet failed.");
1977 return 0; 1977 return 0;
1978 } 1978 }
@@ -1986,9 +1986,9 @@ session_setup_x11fwd(Session *s)
1986 * different than the DISPLAY string for localhost displays. 1986 * different than the DISPLAY string for localhost displays.
1987 */ 1987 */
1988 if (options.x11_use_localhost) { 1988 if (options.x11_use_localhost) {
1989 snprintf(display, sizeof display, "localhost:%d.%d", 1989 snprintf(display, sizeof display, "localhost:%u.%u",
1990 s->display_number, s->screen); 1990 s->display_number, s->screen);
1991 snprintf(auth_display, sizeof auth_display, "unix:%d.%d", 1991 snprintf(auth_display, sizeof auth_display, "unix:%u.%u",
1992 s->display_number, s->screen); 1992 s->display_number, s->screen);
1993 s->display = xstrdup(display); 1993 s->display = xstrdup(display);
1994 s->auth_display = xstrdup(auth_display); 1994 s->auth_display = xstrdup(auth_display);
@@ -2004,10 +2004,10 @@ session_setup_x11fwd(Session *s)
2004 return 0; 2004 return 0;
2005 } 2005 }
2006 memcpy(&my_addr, he->h_addr_list[0], sizeof(struct in_addr)); 2006 memcpy(&my_addr, he->h_addr_list[0], sizeof(struct in_addr));
2007 snprintf(display, sizeof display, "%.50s:%d.%d", inet_ntoa(my_addr), 2007 snprintf(display, sizeof display, "%.50s:%u.%u", inet_ntoa(my_addr),
2008 s->display_number, s->screen); 2008 s->display_number, s->screen);
2009#else 2009#else
2010 snprintf(display, sizeof display, "%.400s:%d.%d", hostname, 2010 snprintf(display, sizeof display, "%.400s:%u.%u", hostname,
2011 s->display_number, s->screen); 2011 s->display_number, s->screen);
2012#endif 2012#endif
2013 s->display = xstrdup(display); 2013 s->display = xstrdup(display);