From: Tobias Brunner Date: Mon, 31 Mar 2014 12:47:00 +0000 (+0200) Subject: settings: Reduce log verbosity if strongswan.conf does not exist X-Git-Tag: 5.1.3rc1~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a38b4556e9fd8102bd6c6c61f2893599a5e8e51;p=thirdparty%2Fstrongswan.git 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. --- diff --git a/src/libstrongswan/utils/settings.c b/src/libstrongswan/utils/settings.c index 0d8ce32008..cf34fd1cf0 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));