"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: gotwebd no-config startup
To:
gameoftrees@openbsd.org
Date:
Fri, 29 Jul 2022 16:41:21 +0200

Download raw body.

Thread
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?