X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fsearch.c;h=be0b283f82df49cb037018088e047ecc8640dc45;hb=6044e46ec7af21658829edde47c4c9c904093df3;hp=0c1d525f8b91c9e253a00c13b533ed4f11ea3bbb;hpb=d918bc9983c454656ee90aaf34d2a9bb80b51f79;p=openldap diff --git a/servers/slapd/search.c b/servers/slapd/search.c index 0c1d525f8b..be0b283f82 100644 --- a/servers/slapd/search.c +++ b/servers/slapd/search.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2009 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -180,7 +180,7 @@ do_search( if ( StatslogTest( LDAP_DEBUG_STATS ) ) { char abuf[BUFSIZ/2], *ptr = abuf; - int len = 0, alen; + unsigned len = 0, alen; sprintf(abuf, "scope=%d deref=%d", op->ors_scope, op->ors_deref); Statslog( LDAP_DEBUG_STATS, @@ -227,7 +227,7 @@ return_results:; op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx ); } if ( op->ors_filter != NULL) { - filter_free_x( op, op->ors_filter ); + filter_free_x( op, op->ors_filter, 1 ); } if ( op->ors_attrs != NULL ) { op->o_tmpfree( op->ors_attrs, op->o_tmpmemctx ); @@ -241,8 +241,7 @@ fe_op_search( Operation *op, SlapReply *rs ) { BackendDB *bd = op->o_bd; - /* fake while loop to allow breaking out */ - while ( op->ors_scope == LDAP_SCOPE_BASE ) { + if ( op->ors_scope == LDAP_SCOPE_BASE ) { Entry *entry = NULL; if ( BER_BVISEMPTY( &op->o_req_ndn ) ) { @@ -299,7 +298,6 @@ fe_op_search( Operation *op, SlapReply *rs ) send_ldap_result( op, rs ); goto return_results; } - break; } if( BER_BVISEMPTY( &op->o_req_ndn ) && !BER_BVISEMPTY( &default_search_nbase ) ) {