From: Luke Howard Date: Thu, 18 Aug 2005 04:12:04 +0000 (+0000) Subject: Add be_match() macro: one cannot always compare BackendDB pointer X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~673 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6cf14a777ae072427500e656b7f71265968419fb;p=openldap 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. --- diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index 08b9668d32..79d074b532 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -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));