]> git.sur5r.net Git - openldap/commitdiff
Unregister VLV control as well when last overlay instance
authorRalf Haferkamp <ralf@openldap.org>
Thu, 4 Nov 2010 12:13:26 +0000 (12:13 +0000)
committerRalf Haferkamp <ralf@openldap.org>
Thu, 4 Nov 2010 12:13:26 +0000 (12:13 +0000)
is removed (additional fix for ITS#6647)

servers/slapd/overlays/sssvlv.c

index 4eb0e8a26f9a1f964b6139034c111930f6597d86..741019105ac501a60f3a06ca88d39b59515e29c5 100644 (file)
@@ -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 */