summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2010-12-26 00:05:28 -0500
committerDmitri Pal <dpal@redhat.com>2011-01-03 15:00:43 -0500
commitf5e1f6494f6350d41fce3e063a8aebf72aa7c4ea (patch)
tree6589f915d49b976b06eec862711464c94ca7fe31
parentaa35a75674482febe3f5f67b3e7c7c7faf507f05 (diff)
downloadding-libs-f5e1f6494f6350d41fce3e063a8aebf72aa7c4ea.tar.gz
ding-libs-f5e1f6494f6350d41fce3e063a8aebf72aa7c4ea.tar.xz
ding-libs-f5e1f6494f6350d41fce3e063a8aebf72aa7c4ea.zip
[INI] Use section line number
Use section line number for error reporting about the section collisions.
-rw-r--r--ini/ini_parse.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ini/ini_parse.c b/ini/ini_parse.c
index 5dd873a..a1c3a26 100644
--- a/ini/ini_parse.c
+++ b/ini/ini_parse.c
@@ -1069,9 +1069,12 @@ static int handle_section(struct parser_obj *po, uint32_t *action)
}
/* Save the line number of the last found key */
- po->keylinenum = po->linenum;
+ po->seclinenum = po->linenum;
- /* Complete processing of this value */
+ /* Complete processing of this value.
+ * A new section will be created inside and a special
+ * value will be added.
+ */
error = complete_value_processing(po);
if (error) {
TRACE_ERROR_NUMBER("Failed to complete value processing", error);