~sircmpwn/himitsu-ssh

5803a9109f3513169b0d5a5ad7544fd99930c244 — Armin Preiml 3 months ago 3ee8153
agent: use default config values for missing options
1 files changed, 3 insertions(+), 1 deletions(-)

M cmd/hissh-agent/config.ha
M cmd/hissh-agent/config.ha => cmd/hissh-agent/config.ha +3 -1
@@ 51,7 51,7 @@ fn load_config_at(path: str) (config | conferr) = {
	const sc = ini::scan(file);
	defer ini::finish(&sc);

	let conf = config { ... };
	let conf = newdefaultconfig();
	let ok = false;
	defer if (!ok) conf_finish(&conf);



@@ 74,8 74,10 @@ fn load_config_at(path: str) (config | conferr) = {
fn conf_remember(conf: *config, e: *ini::entry) (void | errors::invalid) = {
	switch (e.1) {
	case "persist" =>
		free(conf.rpersist);
		conf.rpersist = remember::parse_options(e.2)?;
	case "disclose" =>
		free(conf.rdisclose);
		conf.rdisclose = remember::parse_options(e.2)?;
	case => void;
	};