cs->path, cs->line, whoami->name);
return -1;
}
+ xfree(VALUE(cs->config, char *));
VALUE(cs->config, char *) = xstrdup(vec[0]);
return 0;
}
cs->path, cs->line, vec[0]);
return -1;
}
- *ADDRESS(cs->config, char *) = vec[0];
- return 0;
+ return set_string(cs, whoami, nvec, vec);
}
static int set_netaddress(const struct config_state *cs,
type_namepart = { set_namepart, free_namepartlist },
type_transform = { set_transform, free_transformlist },
type_netaddress = { set_netaddress, free_netaddress },
- type_rights = { set_rights, free_none };
+ type_rights = { set_rights, free_string };
/* specific validation routine */
static int validate_isauser(const struct config_state *cs,
int attribute((unused)) nvec,
char **vec) {
- struct passwd *pw;
-
- if(!(pw = getpwnam(vec[0]))) {
+ if(!getpwnam(vec[0])) {
disorder_error(0, "%s:%d: no such user as '%s'", cs->path, cs->line, vec[0]);
return -1;
}
disorder_error(0, "%s:%d: destination address required", cs->path, cs->line);
return -1;
}
+ xfree(na->address);
return 0;
}
{ C(replay_min), &type_integer, validate_non_negative },
{ C2(restrict, restrictions), &type_restrict, validate_any },
{ C(rtp_delay_threshold), &type_integer, validate_positive },
+ { C(rtp_verbose), &type_boolean, validate_any },
{ C(sample_format), &type_sample_format, validate_sample_format },
{ C(scratch), &type_string_accum, validate_isreg },
{ C(sendmail), &type_string, validate_isabspath },
vector_append(v, s);
va_end(ap);
vector_terminate(v);
- return config_set(cs, v->nvec, v->vec);
+ int rc = config_set(cs, v->nvec, v->vec);
+ xfree(v->vec);
+ return rc;
}
/** @brief Error callback used by config_include()
*
* @p c is indeterminate after this function is called.
*/
-static void config_free(struct config *c) {
+void config_free(struct config *c) {
int n;
if(c) {