]> git.sur5r.net Git - openldap/commitdiff
IDs in the LDIF input were not being used in id2children creation.
authorJulio Sánchez Fernández <jsanchez@openldap.org>
Fri, 30 Jul 1999 18:37:00 +0000 (18:37 +0000)
committerJulio Sánchez Fernández <jsanchez@openldap.org>
Fri, 30 Jul 1999 18:37:00 +0000 (18:37 +0000)
servers/slapd/tools/ldif2id2children-bdb2.c
servers/slapd/tools/ldif2id2children.c

index 61113a3462db65b0a7f856b9995082301fc2836e..713b461dd98c345bf7993672b74156c3aeb78e9b 100644 (file)
@@ -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,
index 6eb25ea47342c20f4e813ade5a906dac90815bf8..459579e7f1b033547d1dc4d3dfb147c4fd5eb97f 100644 (file)
@@ -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,