Kurt Zeilenga [Thu, 11 Feb 1999 21:16:03 +0000 (21:16 +0000)]
Updates for MSVC 5.0. Fix libraries names to be ol{ber,dap,..}32.lib.
Fix library/include paths for building "Release".
Create getpass() from ud's mygetpass().
Kurt Zeilenga [Thu, 11 Feb 1999 17:46:56 +0000 (17:46 +0000)]
Update LDBM cache so that it manages it's own state.
cache_set_state() and state args are no history.
Move cache_entry_cmp() and friends to slapd/entry.c to allow sharing
of functions between backends.. Renamed to entry_cmp().
Kurt Zeilenga [Wed, 10 Feb 1999 18:28:25 +0000 (18:28 +0000)]
Move LDBM-backend specific fields of Entry struct into a private struct.
The new e_private field can be used for any backend purpose. In LDBM,
it's used to point th the private entry info struct. The LDBM entry
info struct is only visible to the LDBM cache.
WARNING: This change has not be ported to other backends! Breakage is likely.
Kurt Spanier [Wed, 10 Feb 1999 13:19:11 +0000 (13:19 +0000)]
Elimination of un-used code in bdb2i_cache_open and friends.
Provision for a bdb2 backend-specific DB file suffix.
Fix of the double-open of backend types.
Kurt Zeilenga [Tue, 9 Feb 1999 17:41:56 +0000 (17:41 +0000)]
Add a field to count the number of databases per type (bi_nDB) to
the backend type info structure. Use this filed to control open
and close such that backend's without databases are skipped.
Kurt Spanier [Mon, 8 Feb 1999 11:42:14 +0000 (11:42 +0000)]
Integration of the BDB2 backend into the new init/startup/shutdown schema.
Integration into ./configure ( --enable-bdb2 ).
Adaptation of the test-suite ( 'make' -> ldbm; 'make bdb2-local' -> bdb2 ).
Minor fixes in slapd/libldbm.
Kurt Spanier [Fri, 5 Feb 1999 16:23:03 +0000 (16:23 +0000)]
Introduction of a new Berkeley DB version 2 (!) specific backend.
BEWARE: the backend will be compiled.
the backend will NOT be invoked, yet.
the backend CANNOT be invoked, yet, because it is NOT yet
integrated into the new initialization/startup environment
of the slapd server.
Kurt Spanier [Fri, 5 Feb 1999 13:20:57 +0000 (13:20 +0000)]
Fix braindead signal handling in linux kernal threads.
First version with waiting on int to become 0; should be implemented
via conditional variable...
Fix of typos.
First anchor for new bdb2 backend.
Kurt Zeilenga [Fri, 5 Feb 1999 09:03:47 +0000 (09:03 +0000)]
New Frontend->Backend Interface
Separates per backend type from per backend database initialization
and startup. Also supports per type / per backend shutdown.
New frontend startup/shutdown routines are also provided:
slap_init() slap_startup() slap_shutdown() slap_destroy()
New frontend->backend startup/shutdown is managed by:
backend_init() backend_startup() backend_shutdown backend_destroy
backend_init() now calls bi_init() to initial all function pointers
for the backend (excepting bi_init() which is now the only hardcoded
entry point). New entry points are detailed in slap.h struct
backend_info. backend_info is a per database type structure.
Besides the new startup/shutdown entry points, the new interface
also supports per backend type configuration options. One could have:
backend bdb2 (new Berkeley DB 2 backend)
bdb2_home /directory
database bdb2
...
*** This code is fairly experimental ***
*** Much cleanup and testing is still needed ***
see slap.h for details on struct backend_db and backend_info.
Kurt Zeilenga [Thu, 4 Feb 1999 18:00:50 +0000 (18:00 +0000)]
Fix dbcache/entry lock deadlock. If dbcache lock is held, it's
okay to read and write LDBM specific fields (state, refcnt,
LRU. The id field, though is read-only once set.
cache_find_entry_dn2id(), hence, does not require any entry locks.
cache_find_entry_id() must do a entry_rdwr_trylock() and back
off if busy.
Add new rdwr lock code with trylock() functionality.
Implement entry_rdwr_trylock().
Kurt Zeilenga [Thu, 4 Feb 1999 17:41:19 +0000 (17:41 +0000)]
Backout recent init/startup changes in preparation for new
frontend-backend interface.
Includes a number changes to share common routines between
database api types.
Kurt Zeilenga [Tue, 2 Feb 1999 02:46:18 +0000 (02:46 +0000)]
Fix idl_firstid to return NOID when !(nids > 1) instead of when (nids == 1)
Fix idl_nextid not to skip an ID if ID not in list.
Both of these should not occur if used correctly, but cheap insurance
against incorrect usage is welcomed.
Kurt Zeilenga [Sun, 31 Jan 1999 07:55:53 +0000 (07:55 +0000)]
Rewrite IDL block code to use simple array and accessor macros
instead of array with overlayed struct fields. (which is inherently
non-portable).
Change maxid check in insert to be greater than or equal instead
of equal.
Use SAFEMEMCPY.
Kurt Zeilenga [Thu, 28 Jan 1999 04:34:55 +0000 (04:34 +0000)]
Use -lldap_r instead of -lldap -lthread.
Likely broke things for non-posix threadings....
Update -lldap_r implementation to:
remove attribute support
hide thread detachment
provide concurrency accessors
provide initialization function
fix gethostby{addr,name}_r codes (not coverred by HAVE_REENTRANT_FUNCTIONS)
Update servers/libraries to use ldap_pvt_thread_ calls.
Cleanup server codes (no #ifdef HAVE_PTHREAD_THIS or _THATs)!
Removed -llthread
Kurt Zeilenga [Tue, 26 Jan 1999 20:55:54 +0000 (20:55 +0000)]
LDBM/back-ldbm locking reworked!
back-ldbm was using a cache specific lock to protect non-reentrant
database routines from being reenterred. This is inadequate.
Also, reentrant database systems calls were serialized unnecessarily.
Non-reentrant database calls must have a big_mutex. Implemented
this within -lldbm itself. library requires ldbm_initialize()
be called before any other ldbm call to initialize the big_mutex
and to do any other db specific initialization (ie: such as
required for DB2).
The dbc_mutex, dbc_cv, & dbc_readers fileds of dbcache are history.
The "reentrant_database" (REENTRANT_DATABASE) define is also axed.