Issue 336 2

These patches consolidate the parse of command line options to ConfigManager.
In addition, it also parses a configuration file.
> If foreground is true and cmdLineOpts.foreground is false, this code
doesn't change foreground to false. Is it OK?

OK. The command line option can set foreground only.


2014-08-12 11:39 GMT+09:00 Kouhei Sutou <notifications@github.com>:

> In server/src/ConfigManager.cc:
>
> > +		if (!succeeded) {
> > +			MLPL_DBG("Failed to load config file: %s (%s)\n",
> > +			         path.c_str(),
> > +			         error ? error->message : "Unknown reason");
> > +			g_error_free(error);
> > +			return false;
> > +		}
> > +
> > +		return true;
> > +	}
> > +
> > +	void reflectCommandLineOptions(const CommandLineOptions &cmdLineOpts)
> > +	{
> > +		if (cmdLineOpts.dbServer)
> > +			parseDBServer(cmdLineOpts.dbServer);
> > +		if (cmdLineOpts.foreground)
>
> If foreground is true and cmdLineOpts.foreground is false, this code
> doesn't change foreground to false. Is it OK?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/project-hatohol/hatohol/pull/365/files#r16093164>.
>