mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
New call to unregister controls registered form overlays
This commit is contained in:
parent
b435efa694
commit
7f70a7aad6
@ -1088,6 +1088,36 @@ overlay_register_control( BackendDB *be, const char *oid )
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef SLAP_CONFIG_DELETE
|
||||
void
|
||||
overlay_unregister_control( BackendDB *be, const char *oid )
|
||||
{
|
||||
int gotit = 0;
|
||||
int cid;
|
||||
|
||||
if ( slap_find_control_id( oid, &cid ) == LDAP_CONTROL_NOT_FOUND ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( SLAP_ISGLOBALOVERLAY( be ) ) {
|
||||
BackendDB *bd;
|
||||
|
||||
/* remove from all backends... */
|
||||
LDAP_STAILQ_FOREACH( bd, &backendDB, be_next ) {
|
||||
if ( bd == be->bd_self ) {
|
||||
gotit = 1;
|
||||
}
|
||||
|
||||
bd->be_ctrls[ cid ] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !gotit ) {
|
||||
be->bd_self->be_ctrls[ cid ] = 0;
|
||||
}
|
||||
}
|
||||
#endif /* SLAP_CONFIG_DELETE */
|
||||
|
||||
void
|
||||
overlay_destroy_one( BackendDB *be, slap_overinst *on )
|
||||
{
|
||||
|
@ -483,6 +483,9 @@ LDAP_SLAPD_F (void) overlay_move LDAP_P((
|
||||
#ifdef SLAP_CONFIG_DELETE
|
||||
LDAP_SLAPD_F (void) overlay_remove LDAP_P((
|
||||
BackendDB *be, slap_overinst *on ));
|
||||
LDAP_SLAPD_F (void) overlay_unregister_control LDAP_P((
|
||||
BackendDB *be,
|
||||
const char *oid ));
|
||||
#endif /* SLAP_CONFIG_DELETE */
|
||||
LDAP_SLAPD_F (int) overlay_callback_after_backover LDAP_P((
|
||||
Operation *op, slap_callback *sc, int append ));
|
||||
|
Loading…
Reference in New Issue
Block a user