From: Julio Sánchez Fernández Date: Fri, 30 Jul 1999 18:37:00 +0000 (+0000) Subject: IDs in the LDIF input were not being used in id2children creation. X-Git-Tag: TWEB_OL_BASE~360 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3a1aab088d305364f57b0f7f63a5527b08897973;p=openldap IDs in the LDIF input were not being used in id2children creation. --- 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,