aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2014-03-31 14:47:00 +0200
committerTobias Brunner <tobias@strongswan.org>2014-03-31 16:40:04 +0200
commit2a38b4556e9fd8102bd6c6c61f2893599a5e8e51 (patch)
treeb77e97684714ed7b216872a8713a8527337781a1
parenta800253fbf04ca077bdf92c7b1642ec02328701e (diff)
downloadstrongswan-2a38b4556e9fd8102bd6c6c61f2893599a5e8e51.tar.bz2
strongswan-2a38b4556e9fd8102bd6c6c61f2893599a5e8e51.tar.xz
settings: Reduce log verbosity if strongswan.conf does not exist
In some situations we expect strongswan.conf to not exist, for instance, when running the unit tests before installation.
-rw-r--r--src/libstrongswan/utils/settings.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libstrongswan/utils/settings.c b/src/libstrongswan/utils/settings.c
index 0d8ce3200..cf34fd1cf 100644
--- a/src/libstrongswan/utils/settings.c
+++ b/src/libstrongswan/utils/settings.c
@@ -1224,7 +1224,16 @@ static bool parse_file(linked_list_t *contents, char *file, int level,
{
if (errno == ENOENT)
{
- DBG1(DBG_LIB, "'%s' does not exist, ignored", file);
+#ifdef STRONGSWAN_CONF
+ if (streq(file, STRONGSWAN_CONF))
+ {
+ DBG2(DBG_LIB, "'%s' does not exist, ignored", file);
+ }
+ else
+#endif
+ {
+ DBG1(DBG_LIB, "'%s' does not exist, ignored", file);
+ }
return TRUE;
}
DBG1(DBG_LIB, "failed to stat '%s': %s", file, strerror(errno));