mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
add support for backend/overlay obsolete names...
This commit is contained in:
parent
26d802ee53
commit
22f05c6785
@ -754,10 +754,27 @@ overlay_find( const char *over_type )
|
||||
|
||||
for ( ; on; on = on->on_next ) {
|
||||
if ( strcmp( on->on_bi.bi_type, over_type ) == 0 ) {
|
||||
break;
|
||||
goto foundit;
|
||||
}
|
||||
|
||||
if ( on->on_bi.bi_obsolete_names != NULL ) {
|
||||
int i;
|
||||
|
||||
for ( i = 0; on->on_bi.bi_obsolete_names[ i ] != NULL; i++ ) {
|
||||
if ( strcmp( on->on_bi.bi_obsolete_names[ i ], over_type ) == 0 ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"overlay_find(\"%s\"): "
|
||||
"obsolete name for \"%s\".\n",
|
||||
on->on_bi.bi_obsolete_names[ i ],
|
||||
on->on_bi.bi_type, 0 );
|
||||
goto foundit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foundit:;
|
||||
return on;
|
||||
}
|
||||
|
||||
|
@ -2196,6 +2196,11 @@ pcache_db_destroy(
|
||||
|
||||
static slap_overinst pcache;
|
||||
|
||||
static char *obsolete_names[] = {
|
||||
"proxycache",
|
||||
NULL
|
||||
};
|
||||
|
||||
int pcache_initialize()
|
||||
{
|
||||
LDAPAttributeType *at;
|
||||
@ -2223,6 +2228,7 @@ int pcache_initialize()
|
||||
}
|
||||
|
||||
pcache.on_bi.bi_type = "pcache";
|
||||
pcache.on_bi.bi_obsolete_names = obsolete_names;
|
||||
pcache.on_bi.bi_db_init = pcache_db_init;
|
||||
pcache.on_bi.bi_db_config = pcache_db_config;
|
||||
pcache.on_bi.bi_db_open = pcache_db_open;
|
||||
|
@ -2184,6 +2184,7 @@ struct slap_backend_info {
|
||||
|
||||
unsigned int bi_nDB; /* number of databases of this type */
|
||||
struct ConfigOCs *bi_cf_ocs;
|
||||
char **bi_obsolete_names;
|
||||
void *bi_private; /* anything the backend type needs */
|
||||
LDAP_STAILQ_ENTRY(slap_backend_info) bi_next ;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user