From 25fffe385ea039ae19f25730cba6c7ea8684860b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 27 Apr 2007 17:35:15 +0000 Subject: [PATCH] r22538: same day late at night in au...:-) fix the strcasecmp_m() returns 0 for a match also use the correct array element to fill priv->dcinfo the fixes the problems where ldb changes the order of the search results when changing the main dc netbios name from "localhost" to "localtest" metze --- source/torture/rpc/drsuapi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/torture/rpc/drsuapi.c b/source/torture/rpc/drsuapi.c index 0129fe9b638..338d2ad759d 100644 --- a/source/torture/rpc/drsuapi.c +++ b/source/torture/rpc/drsuapi.c @@ -139,19 +139,18 @@ static BOOL test_DsGetDomainControllerInfo(struct dcerpc_pipe *p, TALLOC_CTX *me case 1: for (k=0; k < r.out.ctr.ctr1.count; k++) { if (strcasecmp_m(r.out.ctr.ctr1.array[k].netbios_name, - torture_join_netbios_name(priv->join))) { + torture_join_netbios_name(priv->join)) == 0) { found = True; + break; } } break; case 2: - if (r.out.ctr.ctr2.count > 0) { - priv->dcinfo = r.out.ctr.ctr2.array[0]; - } for (k=0; k < r.out.ctr.ctr2.count; k++) { if (strcasecmp_m(r.out.ctr.ctr2.array[k].netbios_name, - torture_join_netbios_name(priv->join))) { + torture_join_netbios_name(priv->join)) == 0) { found = True; + priv->dcinfo = r.out.ctr.ctr2.array[k]; break; } } -- 2.11.4.GIT