From 2fccb8d68e00fc7b21fc8d3926f3f482f3e0e0df Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 7 Feb 2003 19:06:15 +0000 Subject: [PATCH] really put SLAPI behind its #ifdef --- servers/slapd/backend.c | 2 +- servers/slapd/bind.c | 2 ++ servers/slapd/compare.c | 2 ++ servers/slapd/delete.c | 2 ++ servers/slapd/modify.c | 8 ++++---- servers/slapd/modrdn.c | 2 ++ servers/slapd/slapi/slapi.h | 4 +++- 7 files changed, 16 insertions(+), 6 deletions(-) diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 172d32891a..4ebc6839eb 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -687,9 +687,9 @@ backend_unbind( ) { int i; +#if defined( LDAP_SLAPI ) Slapi_PBlock *pb = op->o_pb; -#if defined( LDAP_SLAPI ) int rc; slapi_x_connection_set_pb( pb, conn ); slapi_x_operation_set_pb( pb, op ); diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index 6ec136c75c..bd4816c4b3 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -49,7 +49,9 @@ do_bind( struct berval cred = { 0, NULL }; Backend *be = NULL; +#ifdef LDAP_SLAPI Slapi_PBlock *pb = op->o_pb; +#endif #ifdef NEW_LOGGING LDAP_LOG( OPERATION, ENTRY, "do_bind: conn %d\n", conn->c_connid, 0, 0 ); diff --git a/servers/slapd/compare.c b/servers/slapd/compare.c index 450cd2ba9d..832c5eae8e 100644 --- a/servers/slapd/compare.c +++ b/servers/slapd/compare.c @@ -49,7 +49,9 @@ do_compare( const char *text = NULL; int manageDSAit; +#ifdef LDAP_SLAPI Slapi_PBlock *pb = op->o_pb; +#endif ava.aa_desc = NULL; diff --git a/servers/slapd/delete.c b/servers/slapd/delete.c index aabcbd7e23..4d14b040ec 100644 --- a/servers/slapd/delete.c +++ b/servers/slapd/delete.c @@ -40,7 +40,9 @@ do_delete( int rc; int manageDSAit; +#ifdef LDAP_SLAPI Slapi_PBlock *pb = op->o_pb; +#endif #ifdef NEW_LOGGING LDAP_LOG( OPERATION, ENTRY, diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 42ccaeeaf6..a07396679c 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -42,17 +42,17 @@ do_modify( ber_len_t len; Modifications *modlist = NULL; Modifications **modtail = &modlist; -#ifdef LDAP_SLAPI - LDAPMod **modv = NULL; -#endif #ifdef LDAP_DEBUG Modifications *tmp; +#endif +#ifdef LDAP_SLAPI + LDAPMod **modv = NULL; + Slapi_PBlock *pb = op->o_pb; #endif Backend *be; int rc; const char *text; int manageDSAit; - Slapi_PBlock *pb = op->o_pb; #ifdef NEW_LOGGING LDAP_LOG( OPERATION, ENTRY, "do_modify: enter\n", 0, 0, 0 ); diff --git a/servers/slapd/modrdn.c b/servers/slapd/modrdn.c index 16e26ac265..62f0c6a2a0 100644 --- a/servers/slapd/modrdn.c +++ b/servers/slapd/modrdn.c @@ -65,7 +65,9 @@ do_modrdn( const char *text; int manageDSAit; +#ifdef LDAP_SLAPI Slapi_PBlock *pb = op->o_pb; +#endif #ifdef NEW_LOGGING LDAP_LOG( OPERATION, ENTRY, "do_modrdn: begin\n", 0, 0, 0 ); diff --git a/servers/slapd/slapi/slapi.h b/servers/slapd/slapi/slapi.h index e7e7718d17..187b3f41ac 100644 --- a/servers/slapd/slapi/slapi.h +++ b/servers/slapd/slapi/slapi.h @@ -10,6 +10,8 @@ * without express or implied warranty. */ +#ifdef LDAP_SLAPI /* SLAPI is OPTIONAL */ + #ifndef _SLAPI_H #define _SLAPI_H @@ -526,4 +528,4 @@ LDAP_END_DECL #include "proto-slapi.h" #endif /* _SLAPI_H */ - +#endif /* LDAP_SLAPI */ -- 2.39.5