From 082131cecd9e87eaf19eb7fc08dda0eadbf93bf6 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 8 Nov 2009 01:17:22 -0500 Subject: Fix enumerations The counter was not set so we were storing only the first user for each anumeration. --- server/providers/ldap/sdap_async_accounts.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'server') diff --git a/server/providers/ldap/sdap_async_accounts.c b/server/providers/ldap/sdap_async_accounts.c index 711b4e5ec..b38f6d62d 100644 --- a/server/providers/ldap/sdap_async_accounts.c +++ b/server/providers/ldap/sdap_async_accounts.c @@ -354,7 +354,7 @@ struct tevent_req *sdap_save_users_send(TALLOC_CTX *memctx, state->sysdb = sysdb; state->dom = dom; state->users = users; - state->count = 0; + state->count = num_users; state->cur = 0; state->handle = NULL; state->higher_timestamp = NULL; @@ -423,6 +423,8 @@ static void sdap_save_users_process(struct tevent_req *subreq) * Just report the failure to save and go on */ if (ret) { DEBUG(2, ("Failed to store user %d. Ignoring.\n", state->cur)); + } else { + DEBUG(9, ("User %d processed!\n", state->cur)); } if (timestamp) { @@ -1197,7 +1199,7 @@ struct tevent_req *sdap_save_groups_send(TALLOC_CTX *memctx, state->sysdb = sysdb; state->dom = dom; state->groups = groups; - state->count = 0; + state->count = num_groups; state->cur = 0; state->handle = NULL; state->higher_timestamp = NULL; @@ -1285,6 +1287,8 @@ static void sdap_save_groups_loop(struct tevent_req *subreq) * Just report the failure to save and go on */ if (ret) { DEBUG(2, ("Failed to store group %d. Ignoring.\n", state->cur)); + } else { + DEBUG(9, ("Group %d processed!\n", state->cur)); } if (timestamp) { -- cgit