summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
07e4d76)
time! The load code in settings.c was translating an empty string
into "Default Settings" to pass to {win,ux}store, whereas the save
code was passing the empty string straight down and expecting it to
be dealt with. So, a policy decision: the precise name of the
"Default Settings" special session _at the storage level_ is up to
the individual platform storage code to decide, and all platforms
MUST assume Default Settings is meant if they receive NULL or the
empty string as a session name.
git-svn-id: svn://svn.tartarus.org/sgt/putty@2974
cda61777-01e9-0310-a592-
d414129be87e
void do_defaults(char *session, Config * cfg)
{
void do_defaults(char *session, Config * cfg)
{
- if (session)
- load_settings(session, TRUE, cfg);
- else
- load_settings("Default Settings", FALSE, cfg);
+ load_settings(session, (session != NULL && *session), cfg);
}
static int sessioncmp(const void *av, const void *bv)
}
static int sessioncmp(const void *av, const void *bv)
+ if (!sessionname || !*sessionname)
+ sessionname = "Default Settings";
+
p = smalloc(3 * strlen(sessionname) + 1);
mungestr(sessionname, p);
p = smalloc(3 * strlen(sessionname) + 1);
mungestr(sessionname, p);
HKEY subkey1, sesskey;
char *p;
HKEY subkey1, sesskey;
char *p;
+ if (!sessionname || !*sessionname)
+ sessionname = "Default Settings";
+
p = smalloc(3 * strlen(sessionname) + 1);
mungestr(sessionname, p);
p = smalloc(3 * strlen(sessionname) + 1);
mungestr(sessionname, p);