From: Ralf Haferkamp Date: Thu, 4 Nov 2010 12:13:26 +0000 (+0000) Subject: Unregister VLV control as well when last overlay instance X-Git-Tag: MIGRATION_CVS2GIT~439 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e1c2a67517a6f66edaf40314806c54a36ec2bbd0;p=openldap Unregister VLV control as well when last overlay instance is removed (additional fix for ITS#6647) --- diff --git a/servers/slapd/overlays/sssvlv.c b/servers/slapd/overlays/sssvlv.c index 4eb0e8a26f..741019105a 100644 --- a/servers/slapd/overlays/sssvlv.c +++ b/servers/slapd/overlays/sssvlv.c @@ -1211,19 +1211,20 @@ static int sssvlv_db_destroy( { slap_overinst *on = (slap_overinst *)be->bd_info; sssvlv_info *si = (sssvlv_info *)on->on_bi.bi_private; - + ov_count--; if ( !ov_count && sort_conns) { sort_conns--; ch_free(sort_conns); ldap_pvt_thread_mutex_destroy( &sort_conns_mutex ); } - + #ifdef SLAP_CONFIG_DELETE overlay_unregister_control( be, LDAP_CONTROL_SORTREQUEST ); overlay_unregister_control( be, LDAP_CONTROL_VLVREQUEST ); if ( ov_count == 0 ) { unregister_supported_control( LDAP_CONTROL_SORTREQUEST ); + unregister_supported_control( LDAP_CONTROL_VLVREQUEST ); } #endif /* SLAP_CONFIG_DELETE */