Bug #593953 - Define LDAP_DEPRECATED as we use deprecated functions
authorMilan Crha <mcrha@redhat.com>
Thu, 15 Oct 2009 17:53:02 +0000 (19:53 +0200)
committerMilan Crha <mcrha@redhat.com>
Thu, 15 Oct 2009 17:53:02 +0000 (19:53 +0200)
addressbook/backends/ldap/e-book-backend-ldap.c
configure.ac

index e5398e2..61c4cc0 100644 (file)
@@ -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");
index c3db131..cf1ca3f 100644 (file)
@@ -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"