X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslurpd%2Fldap_op.c;h=dc06b2d310e215eb600257e9e56855cbd35e418c;hb=59d4b38a7c9247d13bbff43c73c253929e348fdf;hp=2f5f870f03070fff844ae9c4f36505137b5f9c34;hpb=acbb5cf689a4336af05c9f259d909d8141055bac;p=openldap diff --git a/servers/slurpd/ldap_op.c b/servers/slurpd/ldap_op.c index 2f5f870f03..dc06b2d310 100644 --- a/servers/slurpd/ldap_op.c +++ b/servers/slurpd/ldap_op.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2006 The OpenLDAP Foundation. + * Copyright 1998-2007 The OpenLDAP Foundation. * Portions Copyright 2003 Mark Benson. * All rights reserved. * @@ -215,8 +215,8 @@ op_ldap_add( 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 { @@ -353,7 +353,7 @@ op_ldap_modify( 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 ); @@ -379,7 +379,7 @@ op_ldap_delete( 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 ); @@ -512,8 +512,8 @@ op_ldap_modrdn( /* 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 ); } @@ -669,7 +669,7 @@ do_bind( ) { int ldrc; - int do_tls = ri->ri_tls; + int do_tls; *lderr = 0; @@ -678,6 +678,8 @@ do_bind( return( BIND_ERR_BADRI ); } + do_tls = ri->ri_tls; + retry: if ( ri->ri_ldp != NULL ) { ldrc = ldap_unbind( ri->ri_ldp );