summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2010-12-26 00:05:28 -0500
committerStephen Gallagher <sgallagh@redhat.com>2012-04-05 11:20:08 -0700
commit68af883a8dd3e812718196b11d48a244478b651e (patch)
tree13734ef781131a961be880cd5845006268ab8cab
parent4da37d4cd782b6e8310f81f53915c914f682fb58 (diff)
downloadding-libs-68af883a8dd3e812718196b11d48a244478b651e.tar.gz
ding-libs-68af883a8dd3e812718196b11d48a244478b651e.tar.xz
ding-libs-68af883a8dd3e812718196b11d48a244478b651e.zip
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 5fa5b2e..8f81f74 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);