Add be_match() macro: one cannot always compare BackendDB pointer

values in order to test equivalence, because the overlay engine
may have reset the backend pointer to a temporary copy on the stack.

So, we test pointer equivalence of the BackendDB itself, then of
be_nsuffix -- this macro can be updated if necessary.
This commit is contained in:
Luke Howard 2005-08-18 04:12:04 +00:00
parent ef7421b87d
commit 6cf14a777a

View File

@ -296,6 +296,9 @@ LDAP_SLAPD_F (void) ava_free LDAP_P((
/*
* backend.c
*/
#define be_match( 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));
LDAP_SLAPD_F (int) backend_num LDAP_P((Backend *be));