[evolution-data-server] Bug #593953 - Define LDAP_DEPRECATED as we use deprecated functions



commit 402a6b3f4e236eb713e09e7c1c208b53dfa41c48
Author: Milan Crha <mcrha redhat com>
Date:   Thu Oct 15 19:53:02 2009 +0200

    Bug #593953 - Define LDAP_DEPRECATED as we use deprecated functions

 addressbook/backends/ldap/e-book-backend-ldap.c |    6 +++---
 configure.ac                                    |    1 +
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/addressbook/backends/ldap/e-book-backend-ldap.c b/addressbook/backends/ldap/e-book-backend-ldap.c
index e5398e2..61c4cc0 100644
--- a/addressbook/backends/ldap/e-book-backend-ldap.c
+++ b/addressbook/backends/ldap/e-book-backend-ldap.c
@@ -856,15 +856,15 @@ e_book_backend_ldap_connect (EBookBackendLDAP *bl)
 
 	blpriv->ldap = ldap_init (blpriv->ldap_host, blpriv->ldap_port);
 
+	if (NULL != blpriv->ldap) {
+		gint ldap_error;
+
 #if defined (DEBUG) && defined (LDAP_OPT_DEBUG_LEVEL)
 	{
 		gint debug_level = 4;
 		ldap_set_option (blpriv->ldap, LDAP_OPT_DEBUG_LEVEL, &debug_level);
 	}
 #endif
-	if (NULL != blpriv->ldap) {
-		gint ldap_error;
-
 		ldap_error = ldap_set_option (blpriv->ldap, LDAP_OPT_PROTOCOL_VERSION, &protocol_version);
 		if (LDAP_SUCCESS != ldap_error) {
 			g_warning ("failed to set protocol version to LDAPv3");
diff --git a/configure.ac b/configure.ac
index c3db131..cf1ca3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1121,6 +1121,7 @@ dnl SunLDAP support, but if OpenLDAP support, skip check SunLDAP.
 	fi
 	AM_CONDITIONAL(SUNLDAP, [test "$with_sunldap" != no])
 
+	LDAP_CFLAGS="$LDAP_CFLAGS -DLDAP_DEPRECATED"
 else
 	dnl Win32 LDAP support
 	LDAP_CFLAGS="-DLDAP_DEPRECATED"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]