0 );
next_id_return( be, e->e_id );
- entry_rdwr_unlock(e, 1);;
+ entry_rdwr_unlock(e, 1);
entry_free( e );
send_ldap_result( conn, op, LDAP_ALREADY_EXISTS, "", "" );
}
Debug( LDAP_DEBUG_TRACE, "<= returning deref DN of \"%s\"\n", newDN, 0, 0 );
+ if (matched != NULL) free(matched);
return newDN;
}
idl_free( idl );
idl = idl_allids( be );
- return idl;
+ return( idl );
}
if ( ! ID_BLOCK_INDIRECT( idl ) ) {
static void set_shutdown(int sig);
static void do_nothing (int sig);
+int listener_running = 1;
+
+
/* a link to the slapd.conf configuration parameters */
extern char *slapd_pid_file;
extern char *slapd_args_file;
}
ldap_pvt_thread_mutex_unlock( &active_threads_mutex );
+ /* a braindead signal handling in LINUX Kernel Threads needs some
+ provision, so that the top thread is not killed before the
+ listener thread (should be better implemented by cond_vars) */
+ listener_running = 0;
+
return NULL;
}
#include "lutil.h" /* Get lutil_detach() */
+extern int listener_running;
+
/*
* when more than one slapd is running on one machine, each one might have
* it's own LOCAL for syslogging and must have its own pid/args files
openlog( serverName, OPENLOG_OPTIONS );
#endif
+#ifdef SLAPD_BDB2
+ bdb2i_do_timing = 1;
+#endif
+
if ( slap_init( SLAP_SERVER_MODE, serverName ) != 0 ) {
rc = 1;
goto destroy;
} else {
/* wait for the listener thread to complete */
- ldap_pvt_thread_join( listener_tid, (void *) NULL );
+ while ( listener_running )
+ ldap_pvt_thread_join( listener_tid, (void *) NULL );
}
} else {
#define ldap_debug slap_debug
#endif
+#ifdef SLAPD_BDB2
+extern int bdb2i_do_timing;
+#endif
+
+
#include "ldap_log.h"
#include "../../libraries/liblber/lber-int.h"
/*
* remaining fields require backend cache lock to access
* These items are specific to the LDBM backend and should
- * and should be hidden.
+ * be hidden.
*/
char e_state; /* for the cache */
#define ENTRY_STATE_DELETED 1