summaryrefslogtreecommitdiff
path: root/source3/lib/tldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/tldap.c')
-rw-r--r--source3/lib/tldap.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/lib/tldap.c b/source3/lib/tldap.c
index 3072482843a..12203236b67 100644
--- a/source3/lib/tldap.c
+++ b/source3/lib/tldap.c
@@ -191,6 +191,11 @@ bool tldap_connection_ok(struct tldap_context *ld)
return !ld->server_down;
}
+static size_t tldap_pending_reqs(struct tldap_context *ld)
+{
+ return talloc_array_length(ld->pending);
+}
+
static struct tldap_ctx_attribute *tldap_context_findattr(
struct tldap_context *ld, const char *name)
{
@@ -471,7 +476,7 @@ static void tldap_msg_unset_pending(struct tevent_req *req)
struct tldap_msg_state *state = tevent_req_data(
req, struct tldap_msg_state);
struct tldap_context *ld = state->ld;
- int num_pending = talloc_array_length(ld->pending);
+ int num_pending = tldap_pending_reqs(ld);
int i;
tevent_req_set_cleanup_fn(req, NULL);
@@ -533,7 +538,7 @@ static bool tldap_msg_set_pending(struct tevent_req *req)
struct tevent_req *subreq;
ld = state->ld;
- num_pending = talloc_array_length(ld->pending);
+ num_pending = tldap_pending_reqs(ld);
pending = talloc_realloc(ld, ld->pending, struct tevent_req *,
num_pending+1);