1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-16 02:27:32 -05:00

Return an error message from x11_setup_display.

The lack of one of those has been a long-standing FIXME for ages.
This commit is contained in:
Simon Tatham
2018-10-06 10:43:04 +01:00
parent 9396fcc9f7
commit 461ade43d1
5 changed files with 35 additions and 11 deletions

View File

@ -1249,12 +1249,14 @@ static void ssh2_connection_process_queue(PacketProtocolLayer *ppl)
/* Potentially enable X11 forwarding. */
if (conf_get_int(s->conf, CONF_x11_forward)) {
char *x11_setup_err;
s->x11disp = x11_setup_display(
conf_get_str(s->conf, CONF_x11_display), s->conf);
conf_get_str(s->conf, CONF_x11_display),
s->conf, &x11_setup_err);
if (!s->x11disp) {
/* FIXME: return an error message from x11_setup_display */
ppl_logevent(("X11 forwarding not enabled: unable to"
" initialise X display"));
" initialise X display: %s", x11_setup_err));
sfree(x11_setup_err);
} else {
s->x11auth = x11_invent_fake_auth(
s->x11authtree, conf_get_int(s->conf, CONF_x11_auth));