X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslurpd%2Fri.c;h=794d5fb75d93deb679a571aa1be44c24a5806e10;hb=8687dace5b3a5a8d2b44c087c8f0091ad0cbc298;hp=fe4e2a385276f533fc185ee690fb02ed882fb646;hpb=3c598e89fb34a892d369a138daa8c3314294493c;p=openldap diff --git a/servers/slurpd/ri.c b/servers/slurpd/ri.c index fe4e2a3852..794d5fb75d 100644 --- a/servers/slurpd/ri.c +++ b/servers/slurpd/ri.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2004 The OpenLDAP Foundation. + * Copyright 1998-2005 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -70,12 +70,7 @@ Ri_process( (void) SIGNAL( SIGPIPE, SIG_IGN ); #endif if ( ri == NULL ) { -#ifdef NEW_LOGGING - LDAP_LOG ( SLURPD, ERR, "Ri_process: " - "Error: ri == NULL!\n", 0, 0, 0 ); -#else Debug( LDAP_DEBUG_ANY, "Error: Ri_process: ri == NULL!\n", 0, 0, 0 ); -#endif return -1; } @@ -105,40 +100,22 @@ Ri_process( if ( re != NULL ) { if ( !ismine( ri, re )) { /* The Re doesn't list my host:port */ -#ifdef NEW_LOGGING - LDAP_LOG ( SLURPD, DETAIL1, "Ri_process: " - "Replica %s:%d, skip repl record for %s (not mine)\n", - ri->ri_hostname, ri->ri_port, re->re_dn ); -#else Debug( LDAP_DEBUG_TRACE, "Replica %s:%d, skip repl record for %s (not mine)\n", ri->ri_hostname, ri->ri_port, re->re_dn ); -#endif } else if ( !isnew( ri, re )) { /* This Re is older than my saved status information */ -#ifdef NEW_LOGGING - LDAP_LOG ( SLURPD, DETAIL1, "Ri_process: " - "Replica %s:%d, skip repl record for %s (old)\n", - ri->ri_hostname, ri->ri_port, re->re_dn ); -#else Debug( LDAP_DEBUG_TRACE, "Replica %s:%d, skip repl record for %s (old)\n", ri->ri_hostname, ri->ri_port, re->re_dn ); -#endif } else { rc = do_ldap( ri, re, &errmsg, &errfree ); switch ( rc ) { case DO_LDAP_ERR_RETRYABLE: ldap_pvt_thread_sleep( RETRY_SLEEP_TIME ); -#ifdef NEW_LOGGING - LDAP_LOG ( SLURPD, DETAIL1, "Ri_process: " - "Retrying operation for DN %s on replica %s:%d\n", - re->re_dn, ri->ri_hostname, ri->ri_port ); -#else Debug( LDAP_DEBUG_ANY, "Retrying operation for DN %s on replica %s:%d\n", re->re_dn, ri->ri_hostname, ri->ri_port ); -#endif continue; break; case DO_LDAP_ERR_FATAL: { @@ -163,13 +140,8 @@ Ri_process( } } } else { -#ifdef NEW_LOGGING - LDAP_LOG ( SLURPD, ERR, "Ri_process: " - "Error: re is null in Ri_process\n", 0, 0, 0 ); -#else Debug( LDAP_DEBUG_ANY, "Error: re is null in Ri_process\n", 0, 0, 0 ); -#endif } rq->rq_lock( rq ); while ( !sglob->slurpd_shutdown && @@ -186,7 +158,7 @@ Ri_process( rq->rq_unlock( rq ); if ( sglob->slurpd_shutdown ) { if ( ri->ri_ldp ) { - ldap_unbind( ri->ri_ldp ); + ldap_unbind_ext( ri->ri_ldp, NULL, NULL ); ri->ri_ldp = NULL; } return 0;