From 6cf14a777ae072427500e656b7f71265968419fb Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Thu, 18 Aug 2005 04:12:04 +0000 Subject: [PATCH] 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. --- servers/slapd/proto-slap.h | 3 +++ 1 file changed, 3 insertions(+) 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)); -- 2.39.5