mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
Give BackendVtable separate id and displayname fields.
The previous 'name' field was awkwardly serving both purposes: it was a machine-readable identifier for the backend used in the saved session format, and it was also used in error messages when Plink wanted to complain that it didn't support a particular backend. Now there are two separate name fields for those purposes.
This commit is contained in:
@ -82,7 +82,7 @@ const struct BackendVtable *backend_vt_from_name(const char *name)
|
||||
{
|
||||
const struct BackendVtable *const *p;
|
||||
for (p = backends; *p != NULL; p++)
|
||||
if (!strcmp((*p)->name, name))
|
||||
if (!strcmp((*p)->id, name))
|
||||
return *p;
|
||||
return NULL;
|
||||
}
|
||||
@ -556,7 +556,7 @@ void save_open_settings(settings_w *sesskey, Conf *conf)
|
||||
const struct BackendVtable *vt =
|
||||
backend_vt_from_proto(conf_get_int(conf, CONF_protocol));
|
||||
if (vt)
|
||||
p = vt->name;
|
||||
p = vt->id;
|
||||
}
|
||||
write_setting_s(sesskey, "Protocol", p);
|
||||
write_setting_i(sesskey, "PortNumber", conf_get_int(conf, CONF_port));
|
||||
|
Reference in New Issue
Block a user