mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-12 18:13:50 -05:00
GTK: handle synchronous connection-setup failures sensibly.
This was one of a handful of remaining places in gtkwin.c where exit() is called incautiously. Of course, a failure to set up one SSH connection should only be fatal to that connection, not the whole process, so really we should be feeding into the connection_fatal system.
This commit is contained in:
parent
28145fe21a
commit
61f3e3e299
@ -4552,9 +4552,9 @@ static void start_backend(struct gui_data *inst)
|
|||||||
char *msg = dupprintf("Unable to open connection to %s:\n%s",
|
char *msg = dupprintf("Unable to open connection to %s:\n%s",
|
||||||
conf_dest(inst->conf), error);
|
conf_dest(inst->conf), error);
|
||||||
inst->exited = TRUE;
|
inst->exited = TRUE;
|
||||||
fatal_message_box(inst, msg);
|
connection_fatal(inst, msg);
|
||||||
sfree(msg);
|
sfree(msg);
|
||||||
exit(0);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
s = conf_get_str(inst->conf, CONF_wintitle);
|
s = conf_get_str(inst->conf, CONF_wintitle);
|
||||||
@ -4929,9 +4929,10 @@ void new_session_window(Conf *conf, const char *geometry_string)
|
|||||||
term_size(inst->term, inst->height, inst->width,
|
term_size(inst->term, inst->height, inst->width,
|
||||||
conf_get_int(inst->conf, CONF_savelines));
|
conf_get_int(inst->conf, CONF_savelines));
|
||||||
|
|
||||||
|
inst->exited = FALSE;
|
||||||
|
|
||||||
start_backend(inst);
|
start_backend(inst);
|
||||||
|
|
||||||
|
if (inst->ldisc) /* early backend failure might make this NULL already */
|
||||||
ldisc_echoedit_update(inst->ldisc); /* cause ldisc to notice changes */
|
ldisc_echoedit_update(inst->ldisc); /* cause ldisc to notice changes */
|
||||||
|
|
||||||
inst->exited = FALSE;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user