Config file parser for lists
Russ Allbery
rra at stanford.edu
Sat Mar 28 11:56:03 UTC 2009
One other issue here.
Julien ÉLIE <julien at trigofacile.com> writes:
> + /* Xref: is mandatory for INN and is the first field after the seven
> + * overview fields defined in RFC 3977. */
> + if (innconf->extraoverview == NULL) {
> + innconf->extraoverview = vector_new();
> + }
> + if (innconf->extraoverview->strings == NULL) {
> + vector_add(innconf->extraoverview, xstrdup("xref"));
> + }
If someone provides a list that doesn't include Xref, I don't think
anything catches that right now. (You also don't want to xstrdup
something you're adding to a vector, as opposed to a cvector, since
vector_add is just going to strdup it again and you end up leaking
memory.)
What I'd suggest doing is removing Xref from user configuration entirely.
INN requires it. We should just make it impossible to configure INN to
not include it in the overview. The easiest way to do that, I think, is
to define extraoverview as all overview fields *after* Xref and just
unconditionally always add Xref as the first field after the standardized
set.
--
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
More information about the inn-workers
mailing list