]> git.sur5r.net Git - openldap/commitdiff
fix building without threads (don't publish any thread-related monitor info...)
authorPierangelo Masarati <ando@openldap.org>
Thu, 26 Oct 2006 21:44:10 +0000 (21:44 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 26 Oct 2006 21:44:10 +0000 (21:44 +0000)
servers/slapd/back-monitor/thread.c

index 4e307beccd5679e9e329d9b1abef3fda72267f9e..3a476cc0d8d2b4d5780fb2971f1c1daa6a0a335c 100644 (file)
 
 #include <ldap_rq.h>
 
-static int 
-monitor_subsys_thread_update( 
-       Operation               *op,
-       SlapReply               *rs,
-       Entry                   *e );
-
+#ifndef NO_THREADS
 typedef enum {
        MT_UNKNOWN,
        MT_RUNQUEUE,
@@ -69,15 +64,22 @@ static struct {
        { BER_BVNULL }
 };
 
+static int 
+monitor_subsys_thread_update( 
+       Operation               *op,
+       SlapReply               *rs,
+       Entry                   *e );
+#endif /* ! NO_THREADS */
+
 /*
  * initializes log subentry
  */
 int
 monitor_subsys_thread_init(
        BackendDB               *be,
-       monitor_subsys_t        *ms
-)
+       monitor_subsys_t        *ms )
 {
+#ifndef NO_THREADS
        monitor_info_t  *mi;
        monitor_entry_t *mp;
        Entry           *e, **ep, *e_thread;
@@ -176,9 +178,11 @@ monitor_subsys_thread_init(
 
        monitor_cache_release( mi, e_thread );
 
+#endif /* ! NO_THREADS */
        return( 0 );
 }
 
+#ifndef NO_THREADS
 static int 
 monitor_subsys_thread_update( 
        Operation               *op,
@@ -310,4 +314,4 @@ monitor_subsys_thread_update(
 
        return SLAP_CB_CONTINUE;
 }
-
+#endif /* ! NO_THREADS */