summaryrefslogtreecommitdiffstats
path: root/common/ini/ini_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/ini/ini_config.c')
-rw-r--r--common/ini/ini_config.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/common/ini/ini_config.c b/common/ini/ini_config.c
index 8d19b272c..4112049f3 100644
--- a/common/ini/ini_config.c
+++ b/common/ini/ini_config.c
@@ -145,7 +145,7 @@ static int ini_to_collection(const char *filename,
if (file == NULL) {
error = errno;
TRACE_ERROR_NUMBER("Failed to open file - but this is OK", error);
- return EOK;
+ return ENOENT;
}
/* Open the collection of errors */
@@ -416,7 +416,8 @@ int config_for_app(const char *application,
TRACE_INFO_STRING("Reading master file:", config_file);
error = ini_to_collection(config_file, *ini_config,
error_level, pass_common);
- if (error != EOK) {
+ /* ENOENT and EOK are Ok */
+ if (error && (error != ENOENT)) {
TRACE_ERROR_NUMBER("Failed to read master file", error);
/* In case of error when we created collection - delete it */
if(error && created) {
@@ -468,7 +469,8 @@ int config_for_app(const char *application,
error = ini_to_collection(file_name, *ini_config,
error_level, pass_specific);
free(file_name);
- if (error) {
+ /* ENOENT and EOK are Ok */
+ if (error && (error != ENOENT)) {
TRACE_ERROR_NUMBER("Failed to read specific application file", error);
/* In case of error when we created collection - delete it */
if (error && created) {