From 3a1aab088d305364f57b0f7f63a5527b08897973 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julio=20S=C3=A1nchez=20Fern=C3=A1ndez?= Date: Fri, 30 Jul 1999 18:37:00 +0000 Subject: [PATCH] IDs in the LDIF input were not being used in id2children creation. --- servers/slapd/tools/ldif2id2children-bdb2.c | 6 +++++- servers/slapd/tools/ldif2id2children.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/servers/slapd/tools/ldif2id2children-bdb2.c b/servers/slapd/tools/ldif2id2children-bdb2.c index 61113a3462..713b461dd9 100644 --- a/servers/slapd/tools/ldif2id2children-bdb2.c +++ b/servers/slapd/tools/ldif2id2children-bdb2.c @@ -240,7 +240,11 @@ main( int argc, char **argv ) } if ( line[0] == '\n' || stop && buf && *buf ) { if ( * buf != '\n' ) { - id++; + if (isdigit((unsigned char) *buf)) { + id = atol(buf); + } else { + id++; + } s = buf; while ( (linep = ldif_getline( &s )) != NULL ) { if ( ldif_parse_line( linep, &type, &val, diff --git a/servers/slapd/tools/ldif2id2children.c b/servers/slapd/tools/ldif2id2children.c index 6eb25ea473..459579e7f1 100644 --- a/servers/slapd/tools/ldif2id2children.c +++ b/servers/slapd/tools/ldif2id2children.c @@ -242,7 +242,11 @@ main( int argc, char **argv ) } if ( line[0] == '\n' || stop && buf && *buf ) { if ( * buf != '\n' ) { - id++; + if (isdigit((unsigned char) *buf)) { + id = atol(buf); + } else { + id++; + } s = buf; while ( (linep = ldif_getline( &s )) != NULL ) { if ( ldif_parse_line( linep, &type, &val, -- 2.39.5