ldap/servers/slapd/daemon.c | 8 +++++---
ldap/servers/slapd/slapi-plugin.h | 5 +++++
2 files changed, 10 insertions(+), 3 deletions(-)
New commits:
commit eba776410c05955a566f7a8a9b125269ba8ea991
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Fri Sep 27 09:20:51 2013 -0400
Ticket 47510 - 389-ds-base does not compile against MozLDAP libraries
Used #ifdef's to remove openldap specific API calls.
Thanks to mvocu for providing the initial patch.
https://fedorahosted.org/389/ticket/47510
Reviewed by: rmeggins(Thanks!)
(cherry picked from commit 069657f1b3c04390c438066bd9ddc8c6a79f1dd0)
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
index 9119dfb..566f53a 100644
--- a/ldap/servers/slapd/daemon.c
+++ b/ldap/servers/slapd/daemon.c
@@ -2594,8 +2594,9 @@ bail:
void
handle_closed_connection(Connection *conn)
{
- ber_sockbuf_remove_io(conn->c_sb, &openldap_sockbuf_io,
- LBER_SBIOD_LEVEL_PROVIDER);
+#ifdef USE_OPENLDAP
+ ber_sockbuf_remove_io(conn->c_sb,
&openldap_sockbuf_io, LBER_SBIOD_LEVEL_PROVIDER);
+#endif
}
/* NOTE: this routine is not reentrant */
@@ -2673,8 +2674,9 @@ handle_new_connection(Connection_Table *ct, int tcps, PRFileDesc
*pr_acceptfd, i
}
#endif /* !USE_OPENLDAP */
maxbersize = config_get_maxbersize();
+#if defined(USE_OPENLDAP)
ber_sockbuf_ctrl( conn->c_sb, LBER_SB_OPT_SET_MAX_INCOMING, &maxbersize );
-
+#endif
if( secure && config_get_SSLclientAuth() != SLAPD_SSLCLIENTAUTH_OFF ) {
/* Prepare to handle the client's certificate (if any): */
int rv;
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h
index bbad2a6..b9c1b02 100644
--- a/ldap/servers/slapd/slapi-plugin.h
+++ b/ldap/servers/slapd/slapi-plugin.h
@@ -366,6 +366,11 @@ NSPR_API(PRUint32) PR_fprintf(struct PRFileDesc* fd, const char *fmt,
...)
#define LDAP_MAXINT (2147483647)
#endif
+/* for mozldap builds */
+#ifndef LDAP_CANCELLED
+#define LDAP_CANCELLED 0x76
+#endif
+
/*
* Sequential access types
*/