From: Pierangelo Masarati Date: Wed, 31 May 2006 14:37:05 +0000 (+0000) Subject: trap an issue that occurred in odd conditions X-Git-Tag: OPENLDAP_REL_ENG_2_4_3ALPHA~9^2~188 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9b7dc0aa364ed92d67d69aa7a6b6d440ea23ff02;p=openldap trap an issue that occurred in odd conditions --- diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 97d0ff58ef..b026770328 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -246,6 +246,18 @@ meta_back_search_start( struct timeval tv, *tvp = NULL; int nretries = 1; + /* this should not happen; just in case... */ + if ( msc->msc_ld == NULL ) { + Debug( LDAP_DEBUG_ANY, + "%s: meta_back_search_start candidate=%d ld=NULL%s.\n", + op->o_log_prefix, candidate, + META_BACK_ONERR_STOP( mi ) ? "" : " (ignored)" ); + if ( META_BACK_ONERR_STOP( mi ) ) { + return META_SEARCH_ERR; + } + return META_SEARCH_NOT_CANDIDATE; + } + Debug( LDAP_DEBUG_TRACE, "%s >>> meta_back_search_start[%d]\n", op->o_log_prefix, candidate, 0 ); /*