be = &backendDB[i];
/* Subordinates are not exposed as their own naming context */
- if ( be->be_flags & SLAP_BFLAG_GLUE_SUBORDINATE ) {
+ if ( SLAP_GLUE_SUBORDINATE( be ) ) {
continue;
}
for ( j = 0; backends[i].be_nsuffix != NULL &&
backends[i].be_nsuffix[j].bv_val != NULL; j++ )
{
- if (( backends[i].be_flags & SLAP_BFLAG_GLUE_SUBORDINATE )
+ if ( ( SLAP_GLUE_SUBORDINATE( &backends[i] ) )
&& noSubs )
{
continue;
* backends and connect them to their superior.
*/
for (i = nBackendDB - 1, b1=&backendDB[i]; cont && i>=0; b1--,i--) {
- if (b1->be_flags & SLAP_BFLAG_GLUE_SUBORDINATE) {
+ if (SLAP_GLUE_SUBORDINATE ( b1 ) ) {
/* The last database cannot be a subordinate of noone */
if (i == nBackendDB - 1) {
b1->be_flags ^= SLAP_BFLAG_GLUE_SUBORDINATE;
}
gi = NULL;
for (j = i-1, be=&backendDB[j]; j>=0; be--,j--) {
- if (!(be->be_flags & SLAP_BFLAG_GLUE_SUBORDINATE)) {
+ if ( ! SLAP_GLUE_SUBORDINATE( be ) ) {
continue;
}
/* We will only link it once */
- if (be->be_flags & SLAP_BFLAG_GLUE_LINKED) {
+ if ( SLAP_GLUE_LINKED( be ) ) {
continue;
}
if (!dnIsSuffix(&be->be_nsuffix[0], &b1->be_nsuffix[0])) {
}
continue;
}
- if ( backends[i].be_flags & SLAP_BFLAG_GLUE_SUBORDINATE ) {
+ if ( SLAP_GLUE_SUBORDINATE( &backends[i] ) ) {
continue;
}
for ( j = 0; backends[i].be_suffix[j].bv_val != NULL; j++ ) {
#define SLAP_BFLAG_DYNAMIC 0x2000U
slap_mask_t be_flags;
#define SLAP_LASTMOD(be) (!((be)->be_flags & SLAP_BFLAG_NOLASTMOD))
+#define SLAP_GLUE_INSTANCE(be) ((be)->be_flags & SLAP_BFLAG_GLUE_INSTANCE)
+#define SLAP_GLUE_SUBORDINATE(be) \
+ ((be)->be_flags & SLAP_BFLAG_GLUE_SUBORDINATE)
+#define SLAP_GLUE_LINKED(be) ((be)->be_flags & SLAP_BFLAG_GLUE_LINKED)
#define SLAP_ALIASES(be) ((be)->be_flags & SLAP_BFLAG_ALIASES)
#define SLAP_REFERRALS(be) ((be)->be_flags & SLAP_BFLAG_REFERRALS)
#define SLAP_SUBENTRIES(be) ((be)->be_flags & SLAP_BFLAG_SUBENTRIES)
/* If the named base is a glue master, operate on the
* entire context
*/
- if (be->be_flags & SLAP_BFLAG_GLUE_INSTANCE)
+ if (SLAP_GLUE_INSTANCE(be))
nosubordinates = 1;
} else if ( dbnum == -1 ) {
/* If just doing the first by default and it is a
* glue subordinate, find the master.
*/
- while (be->be_flags & SLAP_BFLAG_GLUE_SUBORDINATE) {
- nosubordinates = 1;
+ while (SLAP_GLUE_SUBORDINATE(be) || SLAP_MONITOR(be)) {
+ if (SLAP_GLUE_SUBORDINATE(be)) {
+ nosubordinates = 1;
+ }
be++;
}