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

From:
Tracey Emery <tracey@traceyemery.net>
Subject:
Re: gotwebd no-config startup
To:
gameoftrees@openbsd.org
Date:
Fri, 29 Jul 2022 08:56:19 -0600

Download raw body.

Thread
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