]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-monitor/log.c
Simpler fix for NO_THREADS
[openldap] / servers / slapd / back-monitor / log.c
index eb7ac6bdbfa04d78bdc5340bc10221cb334e1053..669f250706494c56b5847d7c3fc25aa2a21621c1 100644 (file)
@@ -1,12 +1,9 @@
 /* log.c - deal with log subsystem */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /*
- * Copyright 2001 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
- * 
  * Copyright 2001, Pierangelo Masarati, All rights reserved. <ando@sys-net.it>
  * 
  * This work has beed deveolped for the OpenLDAP Foundation 
@@ -98,10 +95,10 @@ monitor_subsys_log_init(
        if ( monitor_cache_get( mi, &monitor_subsys[SLAPD_MONITOR_LOG].mss_ndn, 
                                &e ) ) {
 #ifdef NEW_LOGGING
-               LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+               LDAP_LOG( OPERATION, CRIT,
                        "monitor_subsys_log_init: "
                        "unable to get entry '%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_LOG].mss_ndn.bv_val ));
+                       monitor_subsys[SLAPD_MONITOR_LOG].mss_ndn.bv_val, 0, 0 );
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_log_init: "
@@ -183,7 +180,7 @@ monitor_subsys_log_modify(
                        break;
 
                default:
-                       rc = LDAP_OPERATIONS_ERROR;
+                       rc = LDAP_OTHER;
                        break;
                }
 
@@ -199,9 +196,7 @@ monitor_subsys_log_modify(
 
 #if 0  /* need op */
                /* check for abandon */
-               ldap_pvt_thread_mutex_lock( &op->o_abandonmutex );
                if ( op->o_abandon ) {
-                       ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
                        rc = SLAPD_ABANDON;
 
                        goto cleanup;
@@ -209,12 +204,15 @@ monitor_subsys_log_modify(
 #endif
 
                /* check that the entry still obeys the schema */
-               rc = entry_schema_check( e, save_attrs, &text, textbuf
-                               sizeof( textbuf ) );
+               rc = entry_schema_check( be_monitor, e, save_attrs
+                               &text, textbuf, sizeof( textbuf ) );
                if ( rc != LDAP_SUCCESS ) {
                        goto cleanup;
                }
 
+               /*
+                * Do we need to protect this with a mutex?
+                */
                ldap_syslog = newlevel;
 
 #if 0  /* debug rather than log */