Detect multiple -f options: show error message instead of assert (fixes #2416)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2836 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.31
Stefan Bühler 11 years ago
parent bbaef6ab87
commit 3a13ab8bf2

@ -14,6 +14,7 @@ NEWS
* [mod_auth] Fix digest "md5-sess" implementation (Errata ID 1649, RFC 2617) (fixes #2410)
* [auth] Add "AUTH_TYPE" environment (for *cgi), remove fastcgi specific workaround, add fastcgi test case (fixes #889)
* [mod_*cgi,mod_accesslog] Fix splitting :port with ipv6 (fixes #2333, thx simoncpu)
* Detect multiple -f options: show error message instead of assert (fixes #2416)
- 1.4.30 - 2011-12-18
* Always use our 'own' md5 implementation, fixes linking issues on MacOS (fixes #2331)

@ -582,6 +582,13 @@ int main (int argc, char **argv) {
while(-1 != (o = getopt(argc, argv, "f:m:hvVDpt"))) {
switch(o) {
case 'f':
if (srv->config_storage) {
log_error_write(srv, __FILE__, __LINE__, "s",
"Can only read one config file. Use the include command to use multiple config files.");
server_free(srv);
return -1;
}
if (config_read(srv, optarg)) {
server_free(srv);
return -1;

Loading…
Cancel
Save