Signed-off-by: Hans Leidekker hans@codeweavers.com --- dlls/wldap32/option.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/dlls/wldap32/option.c b/dlls/wldap32/option.c index 1037b73174b..0f3d10e1204 100644 --- a/dlls/wldap32/option.c +++ b/dlls/wldap32/option.c @@ -368,9 +368,10 @@ static BOOL query_supported_server_ctrls( LDAP *ld ) { char *attrs[] = { (char *)"supportedControl", NULL }; void *res, *entry; + struct bervalU **ctrls = SERVER_CTRLS(ld); ULONG ret;
- if (SERVER_CTRLS(ld)) return TRUE; + if (ctrls) return TRUE;
ret = map_error( ldap_funcs->fn_ldap_search_ext_s( CTX(ld), (char *)"", LDAP_SCOPE_BASE, (char *)"(objectClass=*)", attrs, FALSE, NULL, NULL, NULL, 0, &res ) ); @@ -380,17 +381,14 @@ static BOOL query_supported_server_ctrls( LDAP *ld ) if (entry) { ULONG count, i; - struct bervalU **ctrls = SERVER_CTRLS(ld); - - *(struct bervalU ***)&SERVER_CTRLS(ld) = ldap_funcs->fn_ldap_get_values_len( CTX(ld), entry, attrs[0] ); - count = ldap_funcs->fn_ldap_count_values_len( SERVER_CTRLS(ld) ); - for (i = 0; i < count; i++) - TRACE("%u: %s\n", i, debugstr_an( ctrls[i]->bv_val, ctrls[i]->bv_len )); + ctrls = ldap_funcs->fn_ldap_get_values_len( CTX(ld), entry, attrs[0] ); + count = ldap_funcs->fn_ldap_count_values_len( ctrls ); + for (i = 0; i < count; i++) TRACE("%u: %s\n", i, debugstr_an( ctrls[i]->bv_val, ctrls[i]->bv_len )); + *(struct bervalU ***)&SERVER_CTRLS(ld) = ctrls; }
ldap_funcs->fn_ldap_msgfree( res ); - - return SERVER_CTRLS(ld) != NULL; + return ctrls != NULL; }
static BOOL is_supported_server_ctrls( LDAP *ld, LDAPControlU **ctrls )
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=89041
Your paranoid android.
=== debiant2 (32 bit WoW report) ===
wldap32: parse.c:205: Test failed: ldap_set_optionW should fail: 0x0 parse.c:209: Test failed: ldap_search_sA failed 0xc parse.c:167: Test failed: ldap_bind_s failed 0x00000051