From: Alan T. DeKok Date: Fri, 5 Jun 2015 18:28:58 +0000 (-0400) Subject: Allow the same config file to be read twice X-Git-Tag: release_3_0_9~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f2f6375fba35f5553c2a1ed7db32736ff66bb33;p=thirdparty%2Ffreeradius-server.git Allow the same config file to be read twice Because it's sometimes useful, and as an error, it rarely happens --- diff --git a/src/main/conffile.c b/src/main/conffile.c index 08e69554a3f..4f7df2c389d 100644 --- a/src/main/conffile.c +++ b/src/main/conffile.c @@ -339,11 +339,14 @@ static FILE *cf_file_open(CONF_SECTION *cs, char const *filename) #endif } + /* + * We can include the same file twice. e.g. when it + * contains common definitions, such as for SQL. + * + * Though the admin should really use templates for that. + */ if (!rbtree_insert(tree, file)) { - ERROR("Cannot include the same file twice: \"%s\"", filename); talloc_free(file); - fclose(fp); - return NULL; } return fp;