diff options
author | agc <agc@pkgsrc.org> | 2003-12-04 14:48:17 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2003-12-04 14:48:17 +0000 |
commit | a2cb5c5b68c04c71d55b95c4b280fc71c75944f6 (patch) | |
tree | 6e00189a0b9ce238b945bf6b169df60802017db0 /databases/openldap/patches | |
parent | 69006809fd4d679f084af7380932015fe4cc0657 (diff) | |
download | pkgsrc-a2cb5c5b68c04c71d55b95c4b280fc71c75944f6.tar.gz |
Add a patch and bump PKGREVISION for a patch by Christian Limpach for a
problem noted on current-users by Murray Armfield.
The problem was: "Just try executing slapindex to get quite a verbose
libpthread invalid mutex message. slapd still core dumps on
shutdown."
Thanks to Christian for fixing this.
Diffstat (limited to 'databases/openldap/patches')
-rw-r--r-- | databases/openldap/patches/patch-ae | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/databases/openldap/patches/patch-ae b/databases/openldap/patches/patch-ae new file mode 100644 index 00000000000..934759c32cd --- /dev/null +++ b/databases/openldap/patches/patch-ae @@ -0,0 +1,34 @@ +$NetBSD: patch-ae,v 1.1 2003/12/04 14:48:17 agc Exp $ + +--- servers/slapd/back-bdb/init.c.orig 2003-11-17 21:31:19.000000000 +0100 ++++ servers/slapd/back-bdb/init.c +@@ -460,17 +460,19 @@ bdb_db_close( BackendDB *be ) + bdb_cache_release_all (&bdb->bi_cache); + + #ifdef SLAP_IDL_CACHE +- ldap_pvt_thread_mutex_lock ( &bdb->bi_idl_tree_mutex ); +- entry = bdb->bi_idl_lru_head; +- while ( entry != NULL ) { +- next_entry = entry->idl_lru_next; +- avl_delete( &bdb->bi_idl_tree, (caddr_t) entry, bdb_idl_entry_cmp ); +- free( entry->idl ); +- free( entry->kstr.bv_val ); +- free( entry ); +- entry = next_entry; ++ if ( bdb->bi_idl_cache_max_size ) { ++ ldap_pvt_thread_mutex_lock ( &bdb->bi_idl_tree_mutex ); ++ entry = bdb->bi_idl_lru_head; ++ while ( entry != NULL ) { ++ next_entry = entry->idl_lru_next; ++ avl_delete( &bdb->bi_idl_tree, (caddr_t) entry, bdb_idl_entry_cmp ); ++ free( entry->idl ); ++ free( entry->kstr.bv_val ); ++ free( entry ); ++ entry = next_entry; ++ } ++ ldap_pvt_thread_mutex_unlock ( &bdb->bi_idl_tree_mutex ); + } +- ldap_pvt_thread_mutex_unlock ( &bdb->bi_idl_tree_mutex ); + #endif + + return 0; |