]> git.sur5r.net Git - openldap/commitdiff
Flip some bits in the backend flags mask
authorKurt Zeilenga <kurt@openldap.org>
Fri, 11 Jan 2002 02:31:47 +0000 (02:31 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 11 Jan 2002 02:31:47 +0000 (02:31 +0000)
servers/slapd/config.c
servers/slapd/slap.h

index 221ef9c22a78f6c6a54f2e69877f2df63e47ea06..7442953c7d19dc774b3a320dc9ee712a1f286664 100644 (file)
@@ -204,8 +204,6 @@ read_config( const char *fname )
                        bi = NULL;
                        be = backend_db_init( cargv[1] );
 
-                       if( lastmod ) be->be_flags |= SLAP_BFLAG_LASTMOD;
-
                        if( be == NULL ) {
 #ifdef NEW_LOGGING
                                LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
@@ -1995,15 +1993,17 @@ read_config( const char *fname )
                                return( 1 );
                        }
                        if ( strcasecmp( cargv[1], "on" ) == 0 ) {
-                               if ( be )
-                                       be->be_flags |= SLAP_BFLAG_LASTMOD;
-                               else
+                               if ( be ) {
+                                       be->be_flags &= ~SLAP_BFLAG_NOLASTMOD;
+                               } else {
                                        lastmod = ON;
+                               }
                        } else {
-                               if ( be )
-                                       be->be_flags &= ~SLAP_BFLAG_LASTMOD;
-                               else
+                               if ( be ) {
+                                       be->be_flags |= SLAP_BFLAG_NOLASTMOD;
+                               } else {
                                        lastmod = OFF;
+                               }
                        }
 
                /* set idle timeout value */
index 9e82409493bb945942a70338ed5bf3c77209b4ce..3bfcc738e2812de8effe4217bd3b896e2f1b5bed 100644 (file)
@@ -1015,19 +1015,20 @@ struct slap_backend_db {
 #define                be_sync bd_info->bi_tool_sync
 #endif
 
-#define SLAP_BFLAG_LASTMOD             0x0001U
-
+#define SLAP_BFLAG_NOLASTMOD           0x0001U
 #define        SLAP_BFLAG_GLUE_INSTANCE        0x0010U /* a glue backend */
 #define        SLAP_BFLAG_GLUE_SUBORDINATE     0x0020U /* child of a glue hierarchy */
 #define        SLAP_BFLAG_GLUE_LINKED          0x0040U /* child is connected to parent */
-
 #define SLAP_BFLAG_ALIASES             0x0100U
-#define SLAP_BFLAG_MONITOR             0x0200U
-#define SLAP_BFLAG_REFERRALS   0x0400U
-#define SLAP_BFLAG_SUBENTRIES  0x0800U
-
+#define SLAP_BFLAG_REFERRALS   0x0200U
+#define SLAP_BFLAG_SUBENTRIES  0x0400U
+#define SLAP_BFLAG_NOMONITOR   0x1000U
        slap_mask_t     be_flags;
-#define SLAP_LASTMOD(be)       ((be)->be_flags & SLAP_BFLAG_LASTMOD)
+#define SLAP_LASTMOD(be)       (!((be)->be_flags & SLAP_BFLAG_NOLASTMOD))
+#define SLAP_ALIASES(be)       ((be)->be_flags & SLAP_BFLAG_ALIASES)
+#define SLAP_REFERRALS(be)     ((be)->be_flags & SLAP_BFLAG_REFERRALS)
+#define SLAP_SUBENTRIES(be)    ((be)->be_flags & SLAP_BFLAG_SUBENTRIES)
+#define SLAP_MONITOR(be)       (!(be)->be_flags & SLAP_BFLAG_NOMONITOR))
 
        slap_mask_t     be_restrictops;         /* restriction operations */
 #define SLAP_RESTRICT_OP_ADD           0x0001U