Download raw body.
gotwebd no-config startup
On Fri, Jul 29, 2022 at 04:41:21PM +0200, Stefan Sperling wrote:
> On Fri, Jul 29, 2022 at 08:18:36AM -0600, Tracey Emery wrote:
> > >
> > > /* just add default server if no config specified */
> > > - if (gotwebd->server_cnt == 0) {
> > > - new_srv = conf_new_server(D_SITENAME);
> > > - log_debug("%s: adding default server %s", __func__, D_SITENAME);
> > > - }
> > > + if (gotwebd->server_cnt == 0)
> > > + add_default_server();
> > >
> > not needed
> > -------------------
>
> Are you sure? There are two cases, one where the file does not exist at all,
> and one where the file exists but is empty. As I understand the above code,
> it tries to handle an empty config file?
>
No, you're correct. I forgot about the empty config file scenario.
--
Tracey Emery
gotwebd no-config startup