diff options
Diffstat (limited to 'modules/experimental/util_ldap.c')
-rw-r--r-- | modules/experimental/util_ldap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/experimental/util_ldap.c b/modules/experimental/util_ldap.c index 9a74445784..dabc4e7dec 100644 --- a/modules/experimental/util_ldap.c +++ b/modules/experimental/util_ldap.c @@ -769,6 +769,7 @@ LDAP_DECLARE(int) util_ldap_cache_checkuserid(request_rec *r, util_ldap_connecti const char ***retvals) { const char **vals = NULL; + int numvals = 0; int result = 0; LDAPMessage *res, *entry; char *dn; @@ -932,6 +933,7 @@ start_over: int i = 0; while (attrs[k++]); vals = apr_pcalloc(r->pool, sizeof(char *) * (k+1)); + numvals = k; while (attrs[i]) { char **values; int j = 0; @@ -959,6 +961,7 @@ start_over: the_search_node.bindpw = bindpw; the_search_node.lastbind = apr_time_now(); the_search_node.vals = vals; + the_search_node.numvals = numvals; /* Search again to make sure that another thread didn't ready insert this node into the cache before we got here. If it does exist then update the lastbind */ @@ -1001,6 +1004,7 @@ LDAP_DECLARE(int) util_ldap_cache_getuserdn(request_rec *r, util_ldap_connection const char ***retvals) { const char **vals = NULL; + int numvals = 0; int result = 0; LDAPMessage *res, *entry; char *dn; @@ -1115,6 +1119,7 @@ start_over: int i = 0; while (attrs[k++]); vals = apr_pcalloc(r->pool, sizeof(char *) * (k+1)); + numvals = k; while (attrs[i]) { char **values; int j = 0; @@ -1142,6 +1147,7 @@ start_over: the_search_node.bindpw = NULL; the_search_node.lastbind = apr_time_now(); the_search_node.vals = vals; + the_search_node.numvals = numvals; /* Search again to make sure that another thread didn't ready insert this node into the cache before we got here. If it does exist then update the lastbind */ |