1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -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

@ -801,12 +801,19 @@ void run_agent(void)
int greetinglen;
Socket *s;
struct X11Connection *conn;
char *x11_setup_err;
if (!display) {
fprintf(stderr, "pageant: no DISPLAY for -X mode\n");
exit(1);
}
disp = x11_setup_display(display, conf);
disp = x11_setup_display(display, conf, &x11_setup_err);
if (!disp) {
fprintf(stderr, "pageant: unable to connect to X server: %s\n",
x11_setup_err);
sfree(x11_setup_err);
exit(1);
}
conn = snew(struct X11Connection);
conn->plug.vt = &X11Connection_plugvt;