]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/entry.c
Set peeraddr also for IPv6, fixes ITS#1918
[openldap] / servers / slapd / back-ldbm / entry.c
index 16227caa2e43950f2c6a5aee22a5616aca21749d..9e2cdc17f5e0b5d617d858276516862c332d3121 100644 (file)
@@ -1,7 +1,7 @@
 /* entry.c - ldbm backend entry_release routine */
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
@@ -31,8 +31,13 @@ ldbm_back_entry_release_rw(
        if ( slapMode == SLAP_SERVER_MODE ) {
                /* free entry and reader or writer lock */
                cache_return_entry_rw( &li->li_cache, e, rw ); 
+               if( rw ) {
+                       ldap_pvt_thread_rdwr_wunlock( &li->li_giant_rwlock );
+               } else {
+                       ldap_pvt_thread_rdwr_runlock( &li->li_giant_rwlock );
+               }
+
        } else {
-               
                entry_free( e );
        }