summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/shared/dlt_config_file_parser.c4
-rw-r--r--src/shared/dlt_config_file_parser.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/dlt_config_file_parser.c b/src/shared/dlt_config_file_parser.c
index bf6dfb4..e701341 100644
--- a/src/shared/dlt_config_file_parser.c
+++ b/src/shared/dlt_config_file_parser.c
@@ -123,7 +123,7 @@ static int dlt_config_file_set_section(DltConfigFile *file, char *name)
int section = file->num_sections;
/* check if adding another section would exceed max number of sections */
- if (section + 1 >= DLT_CONFIG_FILE_SECTIONS_MAX) {
+ if (section >= DLT_CONFIG_FILE_SECTIONS_MAX) {
dlt_log(LOG_WARNING, "Cannot store more sections\n");
return -1; /* reached max number of sections */
}
@@ -538,6 +538,6 @@ int dlt_config_file_get_value(const DltConfigFile *file,
}
}
- dlt_log(LOG_WARNING, "Entry does not exist in section \n");
+ dlt_vlog(LOG_WARNING, "Entry does not exist in section: %s\n", key);
return -1;
}
diff --git a/src/shared/dlt_config_file_parser.h b/src/shared/dlt_config_file_parser.h
index 915ddc0..acde08c 100644
--- a/src/shared/dlt_config_file_parser.h
+++ b/src/shared/dlt_config_file_parser.h
@@ -62,7 +62,7 @@
#define DLT_CONFIG_FILE_PATH_MAX_LEN 100 /* absolute path including filename */
#define DLT_CONFIG_FILE_ENTRY_MAX_LEN 100 /* Entry for section, key and value */
#define DLT_CONFIG_FILE_LINE_MAX_LEN 210
-#define DLT_CONFIG_FILE_SECTIONS_MAX 100
+#define DLT_CONFIG_FILE_SECTIONS_MAX 125
#define DLT_CONFIG_FILE_KEYS_MAX 25 /* Maximal keys per section */
typedef struct DltConfigKeyData