]> git.sur5r.net Git - openldap/commitdiff
ITS#141: Add ldbm_ignore_nextid_file, since tools/ldif2* handles it privately
authorHallvard Furuseth <hallvard@openldap.org>
Fri, 30 Apr 1999 05:24:16 +0000 (05:24 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Fri, 30 Apr 1999 05:24:16 +0000 (05:24 +0000)
servers/slapd/back-ldbm/back-ldbm.h
servers/slapd/back-ldbm/config.c
servers/slapd/back-ldbm/nextid.c
servers/slapd/tools/ldif2id2children.c
servers/slapd/tools/ldif2id2entry.c
servers/slapd/tools/ldif2index.c
servers/slapd/tools/ldif2ldbm.c

index 0f6623ce578f95f3468c0db8080fb3404057c158..73fc4eb902e93cad32b96c3a4cf12168d0faddae 100644 (file)
@@ -142,6 +142,8 @@ struct ldbminfo {
 #endif
 };
 
+extern int ldbm_ignore_nextid_file;
+
 #include "proto-back-ldbm.h"
 
 LDAP_END_DECL
index af385a14883623a1c38d67d8243a88a1c661a1c6..e31ef72422e2f57ba4b61f213222746f76c70b83 100644 (file)
@@ -10,6 +10,9 @@
 #include "slap.h"
 #include "back-ldbm.h"
 
+int ldbm_ignore_nextid_file = 0;
+
+
 int
 ldbm_back_db_config(
     Backend    *be,
index 031e0a1d36fe46a61b61cf5b6e8763c036f7e106..34c7bfe5c92c6414ff7b52f7ae078c4066c50f07 100644 (file)
@@ -27,6 +27,9 @@ next_id_read( Backend *be )
        char*   file = li->li_nextid_file; 
        FILE*   fp;
 
+       if ( ldbm_ignore_nextid_file )
+               return NOID;
+
        if ( (fp = fopen( file, "r" )) == NULL ) {
                Debug( LDAP_DEBUG_ANY,
                    "next_id_read: could not open \"%s\"\n",
@@ -63,6 +66,9 @@ next_id_write( Backend *be, ID id )
        FILE*   fp;
        int             rc;
 
+       if ( ldbm_ignore_nextid_file )
+               return 0;
+
        if ( (fp = fopen( file, "w" )) == NULL ) {
                Debug( LDAP_DEBUG_ANY, "next_id_write(%ld): could not open \"%s\"\n",
                    id, file, 0 );
index 6c36ee546e8bc28caa31f28ec0d9d8c2786cc9f9..8564b86777fc052d92325060fceb8c6b82254dee 100644 (file)
@@ -42,6 +42,8 @@ main( int argc, char **argv )
        struct berval   bv;
        struct berval   *vals[2];
 
+       ldbm_ignore_nextid_file = 1;
+
        tailorfile = SLAPD_DEFAULT_CONFIGFILE;
        dbnum = -1;
        while ( (i = getopt( argc, argv, "d:f:i:n:" )) != EOF ) {
index 6f80b282e096eaaa87a0b6a014401da310747449..9ed951bc47b4e4714eca9773f019bea56e05b248 100644 (file)
@@ -40,6 +40,8 @@ main( int argc, char **argv )
        struct berval   *vals[2];
        FILE            *fp;
 
+       ldbm_ignore_nextid_file = 1;
+
        tailorfile = SLAPD_DEFAULT_CONFIGFILE;
        dbnum = -1;
        while ( (i = getopt( argc, argv, "d:f:i:n:" )) != EOF ) {
index d7efa59f76ffdb2abf731aedc0e52fd3aacde8c0..60688763beffb19e65857f0586fd35fff136d632 100644 (file)
@@ -39,6 +39,8 @@ main( int argc, char **argv )
        struct berval   bv;
        struct berval   *vals[2];
 
+       ldbm_ignore_nextid_file = 1;
+
        inputfile = NULL;
        tailorfile = SLAPD_DEFAULT_CONFIGFILE;
        dbnum = -1;
index 5426c606b36536e2be7ddbb58162b8da901374b6..ec0ca9c5067e3ba36bf15b12c1c3cfe6c4c437a8 100644 (file)
@@ -65,6 +65,8 @@ main( int argc, char **argv )
        struct berval   *vals[2];
        Avlnode         *avltypes = NULL;
 
+       ldbm_ignore_nextid_file = 1;
+
        sbindir = DEFAULT_SBINDIR;
        tailorfile = SLAPD_DEFAULT_CONFIGFILE;
        dbnum = -1;