summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2018-11-28 02:49:09 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2018-11-28 02:49:09 -0500
commita7bceb6b06a7f5a1b68163a73da182bf51a434c0 (patch)
tree23d36ce3737460fb6751a233c4ce1317e491b30b
parent77c01f981725512653c01cde5ca74c11633dfec4 (diff)
downloadlighttpd1.4-a7bceb6b06a7f5a1b68163a73da182bf51a434c0.tar.gz
lighttpd1.4-a7bceb6b06a7f5a1b68163a73da182bf51a434c0.zip
[core] quiet indexfile warning if mod not loaded
-rw-r--r--src/server.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/server.c b/src/server.c
index 68b74c2c..de535a56 100644
--- a/src/server.c
+++ b/src/server.c
@@ -1178,12 +1178,18 @@ static int server_main (server * const srv, int argc, char **argv) {
}
/* mod_indexfile should be listed in server.modules prior to dynamic handlers */
- for (i = 0; i < srv->plugins.used; ++i) {
+ i = 0;
+ for (buffer *pname = NULL; i < srv->plugins.used; ++i) {
plugin *p = ((plugin **)srv->plugins.ptr)[i];
- if (buffer_is_equal_string(p->name, CONST_STR_LEN("indexfile"))) break;
+ if (buffer_is_equal_string(p->name, CONST_STR_LEN("indexfile"))) {
+ if (!pname) {
+ log_error_write(srv, __FILE__, __LINE__, "SB",
+ "Warning: mod_indexfile should be listed in server.modules prior to mod_", pname);
+ }
+ break;
+ }
if (p->handle_subrequest_start && p->handle_subrequest) {
- log_error_write(srv, __FILE__, __LINE__, "SB",
- "Warning: mod_indexfile should be listed in server.modules prior to mod_", p->name);
+ if (!pname) pname = p->name;
}
}