Check for NULL in be_match()

Use be_match() in backend.c operational processing
This commit is contained in:
Luke Howard 2005-08-18 04:34:04 +00:00
parent 53a15b6820
commit 2ff5c27f63
2 changed files with 3 additions and 2 deletions

View File

@ -1666,7 +1666,7 @@ fe_aux_operational(
/* Let the overlays have a chance at this */
be_orig = op->o_bd;
op->o_bd = select_backend( &op->o_req_ndn, 0, 0 );
if ( op->o_bd != frontendDB &&
if ( !be_match( op->o_bd, frontendDB ) &&
( SLAP_OPATTRS( rs->sr_attr_flags ) || rs->sr_attrs ) &&
op->o_bd != NULL && op->o_bd->be_operational != NULL )
{

View File

@ -297,7 +297,8 @@ LDAP_SLAPD_F (void) ava_free LDAP_P((
* backend.c
*/
#define be_match( be1, be2 ) ( (be1) == (be2) || (be1)->be_nsuffix == (be2)->be_nsuffix )
#define be_match( be1, be2 ) ( (be1) == (be2) || \
( (be1) && (be2) && (be1)->be_nsuffix == (be2)->be_nsuffix ) )
LDAP_SLAPD_F (int) backend_init LDAP_P((void));
LDAP_SLAPD_F (int) backend_add LDAP_P((BackendInfo *aBackendInfo));