Skip to content
Snippets Groups Projects
Commit 27f28d52 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

handle overlays

parent c984dbf0
No related branches found
No related tags found
No related merge requests found
......@@ -94,6 +94,7 @@ struct monitorinfo {
AttributeDescription *mi_ad_monitorConnectionLocalAddress;
AttributeDescription *mi_ad_monitorConnectionPeerAddress;
AttributeDescription *mi_ad_monitorTimestamp;
AttributeDescription *mi_ad_monitorOverlay;
/*
* Generic description attribute
......
......@@ -66,11 +66,18 @@ monitor_subsys_database_init(
e_tmp = NULL;
for ( i = nBackendDB; i--; ) {
char buf[ BACKMONITOR_BUFSIZE ];
int j;
char buf[ BACKMONITOR_BUFSIZE ];
int j;
slap_overinfo *oi = NULL;
be = &backendDB[i];
if ( strcmp( be->bd_info->bi_type, "over" ) == 0 ) {
oi = (slap_overinfo *)be->bd_info;
be = &oi->oi_bd;
}
/* Subordinates are not exposed as their own naming context */
if ( SLAP_GLUE_SUBORDINATE( be ) ) {
continue;
......@@ -125,6 +132,19 @@ monitor_subsys_database_init(
be->be_suffix, be->be_nsuffix );
}
if ( oi != NULL ) {
slap_overinst *on = oi->oi_list;
for ( ; on; on = on->on_next ) {
struct berval bv;
bv.bv_val = on->on_bi.bi_type;
bv.bv_len = strlen( bv.bv_val );
attr_merge_normalize_one( e, mi->mi_ad_monitorOverlay,
&bv, NULL );
}
}
for ( j = nBackendInfo; j--; ) {
if ( backendInfo[ j ].bi_type == be->bd_info->bi_type ) {
struct berval bv;
......
......@@ -323,6 +323,7 @@ monitor_back_db_open(
"$ seeAlso "
"$ monitoredInfo "
"$ managedInfo "
"$ monitorOverlay "
") )", SLAP_OC_OPERATIONAL|SLAP_OC_HIDE,
offsetof(struct monitorinfo, mi_oc_monitor) },
{ "monitorServer", "( 1.3.6.1.4.1.4203.666.3.7 "
......@@ -440,6 +441,13 @@ monitor_back_db_open(
"NO-USER-MODIFICATION "
"USAGE directoryOperation )", SLAP_AT_FINAL|SLAP_AT_HIDE,
offsetof(struct monitorinfo, mi_ad_monitorTimestamp) },
{ "monitorOverlay", "( 1.3.6.1.4.1.4203.666.1.27 "
"NAME 'monitorOverlay' "
"DESC 'name of overlays defined for a give database' "
"SUP monitoredInfo "
"NO-USER-MODIFICATION "
"USAGE directoryOperation )", SLAP_AT_HIDE,
offsetof(struct monitorinfo, mi_ad_monitorOverlay) },
#ifdef INTEGRATE_CORE_SCHEMA
{ NULL, NULL, 0, -1 }, /* description */
{ NULL, NULL, 0, -1 }, /* seeAlso */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment