/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
* Portions Copyright 2003 Mark Benson.
* All rights reserved.
*
static void free_ldapmod LDAP_P(( LDAPMod * ));
static void free_ldmarr LDAP_P(( LDAPMod ** ));
static int getmodtype LDAP_P(( char * ));
+#ifdef SLAPD_UNUSED
static void dump_ldm_array LDAP_P(( LDAPMod ** ));
+#endif
static int do_bind LDAP_P(( Ri *, int * ));
static int do_unbind LDAP_P(( Ri * ));
ri->ri_hostname, ri->ri_port, re->re_dn );
rc = ldap_add_s( ri->ri_ldp, re->re_dn, ldmarr );
- ldap_get_option( ri->ri_ldp, LDAP_OPT_ERROR_NUMBER, &lderr);
- ldap_get_option( ri->ri_ldp, LDAP_OPT_ERROR_STRING, errmsg);
+ ldap_get_option( ri->ri_ldp, LDAP_OPT_RESULT_CODE, &lderr);
+ ldap_get_option( ri->ri_ldp, LDAP_OPT_DIAGNOSTIC_MESSAGE, errmsg);
*errfree = 1;
} else {
Debug( LDAP_DEBUG_ARGS, "replica %s:%d - modify dn \"%s\"\n",
ri->ri_hostname, ri->ri_port, re->re_dn );
rc = ldap_modify_s( ri->ri_ldp, re->re_dn, ldmarr );
- ldap_get_option( ri->ri_ldp, LDAP_OPT_ERROR_STRING, errmsg);
+ ldap_get_option( ri->ri_ldp, LDAP_OPT_DIAGNOSTIC_MESSAGE, errmsg);
*errfree = 1;
}
free_ldmarr( ldmarr );
Debug( LDAP_DEBUG_ARGS, "replica %s:%d - delete dn \"%s\"\n",
ri->ri_hostname, ri->ri_port, re->re_dn );
rc = ldap_delete_s( ri->ri_ldp, re->re_dn );
- ldap_get_option( ri->ri_ldp, LDAP_OPT_ERROR_STRING, errmsg);
+ ldap_get_option( ri->ri_ldp, LDAP_OPT_DIAGNOSTIC_MESSAGE, errmsg);
*errfree = 1;
return( rc );
/* Do the modrdn */
rc = ldap_rename2_s( ri->ri_ldp, re->re_dn, newrdn, newsup, drdnflag );
- ldap_get_option( ri->ri_ldp, LDAP_OPT_ERROR_NUMBER, &lderr);
- ldap_get_option( ri->ri_ldp, LDAP_OPT_ERROR_STRING, errmsg);
+ ldap_get_option( ri->ri_ldp, LDAP_OPT_RESULT_CODE, &lderr);
+ ldap_get_option( ri->ri_ldp, LDAP_OPT_DIAGNOSTIC_MESSAGE, errmsg);
*errfree = 1;
return( lderr );
}
)
{
int ldrc;
- int do_tls = ri->ri_tls;
+ int do_tls;
*lderr = 0;
return( BIND_ERR_BADRI );
}
+ do_tls = ri->ri_tls;
+
retry:
if ( ri->ri_ldp != NULL ) {
ldrc = ldap_unbind( ri->ri_ldp );
/*
* For debugging. Print the contents of an ldmarr array.
*/
+#ifdef SLAPD_UNUSED
static void
dump_ldm_array(
LDAPMod **ldmarr
}
}
}
+#endif