]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/monitor.c
Unify use of BDB lockers
[openldap] / servers / slapd / back-bdb / monitor.c
index 6697b82c032eb86e84aed61c4c0edcdd56b05cd6..9114fac70b8ade71f5b883173f4b6eb4ddca6251 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2000-2006 The OpenLDAP Foundation.
+ * Copyright 2000-2007 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -67,7 +67,7 @@ static struct {
                "DESC 'Number of items in Entry Cache' "
                "SUP monitorCounter "
                "NO-USER-MODIFICATION "
-               "USAGE directoryOperation )",
+               "USAGE dSAOperation )",
                &ad_olmBDBEntryCache },
 
        { "( olmBDBAttributes:2 "
@@ -75,7 +75,7 @@ static struct {
                "DESC 'Number of items in EntryInfo Cache' "
                "SUP monitorCounter "
                "NO-USER-MODIFICATION "
-               "USAGE directoryOperation )",
+               "USAGE dSAOperation )",
                &ad_olmBDBEntryInfo },
 
        { "( olmBDBAttributes:3 "
@@ -83,7 +83,7 @@ static struct {
                "DESC 'Number of items in IDL Cache' "
                "SUP monitorCounter "
                "NO-USER-MODIFICATION "
-               "USAGE directoryOperation )",
+               "USAGE dSAOperation )",
                &ad_olmBDBIDLCache },
 
        { "( olmBDBAttributes:4 "
@@ -92,7 +92,7 @@ static struct {
                        "where the database environment resides' "
                "SUP monitoredInfo "
                "NO-USER-MODIFICATION "
-               "USAGE directoryOperation )",
+               "USAGE dSAOperation )",
                &ad_olmDbDirectory },
 
        { NULL }
@@ -152,6 +152,7 @@ bdb_monitor_update(
        return SLAP_CB_CONTINUE;
 }
 
+#if 0  /* uncomment if required */
 static int
 bdb_monitor_modify(
        Operation       *op,
@@ -161,11 +162,12 @@ bdb_monitor_modify(
 {
        return SLAP_CB_CONTINUE;
 }
+#endif
 
 static int
 bdb_monitor_free(
        Entry           *e,
-       void            *priv )
+       void            **priv )
 {
        struct berval   values[ 2 ];
        Modification    mod = { 0 };
@@ -176,6 +178,7 @@ bdb_monitor_free(
        int             i, rc;
 
        /* NOTE: if slap_shutdown != 0, priv might have already been freed */
+       *priv = NULL;
 
        /* Remove objectClass */
        mod.sm_op = LDAP_MOD_DELETE;