]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-meta/candidates.c
Drop unnecessary memset()s
[openldap] / servers / slapd / back-meta / candidates.c
index 878e6aee587b8b7c9f3cbcc7e733dbec3d9491e3..e0c0116af62cad98a419ea7624fb0285df40ab7e 100644 (file)
@@ -187,12 +187,16 @@ meta_clear_one_candidate(
 {
        metasingleconn_t        *msc = &mc->mc_conns[ candidate ];
 
-       if ( msc->msc_ld ) {
+       if ( msc->msc_ld != NULL ) {
 
-#if 0
-               Debug( LDAP_DEBUG_ANY, "### %s meta_clear_one_candidate ldap_unbind_ext[%d] mc=%p\n",
-                       op ? op->o_log_prefix : "", candidate, (void *)mc );
-#endif
+#ifdef DEBUG_205
+               char    buf[ BUFSIZ ];
+
+               snprintf( buf, sizeof( buf ), "meta_clear_one_candidate ldap_unbind_ext[%d] mc=%p ld=%p",
+                       candidate, (void *)mc, (void *)msc->msc_ld );
+               Debug( LDAP_DEBUG_ANY, "### %s %s\n",
+                       op ? op->o_log_prefix : "", buf, 0 );
+#endif /* DEBUG_205 */
 
                ldap_unbind_ext( msc->msc_ld, NULL, NULL );
                msc->msc_ld = NULL;
@@ -209,23 +213,8 @@ meta_clear_one_candidate(
                BER_BVZERO( &msc->msc_cred );
        }
 
-       return 0;
-}
-
-/*
- * meta_clear_candidates
- *
- * clears all candidates
- */
-int
-meta_clear_candidates( Operation *op, metaconn_t *mc )
-{
-       metainfo_t      *mi = ( metainfo_t * )op->o_bd->be_private;
-       int             c;
-
-       for ( c = 0; c < mi->mi_ntargets; c++ ) {
-               meta_clear_one_candidate( op, mc, c );
-       }
+       msc->msc_mscflags = 0;
 
        return 0;
 }
+