From 18c6757dbb7ee0e6a4be15b0f2a3fec1f94ba518 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 23 Aug 2012 09:03:36 +0200 Subject: s3:lib: only loop over the server_ids we need to verify in serverids_exist() metze --- source3/lib/serverid.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'source3/lib/serverid.c') diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c index 61860977cf..3392e83c89 100644 --- a/source3/lib/serverid.c +++ b/source3/lib/serverid.c @@ -270,6 +270,8 @@ bool serverids_exist(const struct server_id *ids, int num_ids, bool *results) int todo_num = 0; int *remote_idx = NULL; int remote_num = 0; + int *verify_idx = NULL; + int verify_num = 0; int t, idx; bool result = false; struct db_context *db; @@ -296,6 +298,10 @@ bool serverids_exist(const struct server_id *ids, int num_ids, bool *results) if (remote_idx == NULL) { goto fail; } + verify_idx = talloc_array(talloc_tos(), int, num_ids); + if (verify_idx == NULL) { + goto fail; + } for (idx=0; idx