Probably server protects itself from quick successive connections from the same client and returns LDAP_SERVER_DOWN.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/adsldp/ldap.c | 2 +- dlls/adsldp/tests/ldap.c | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/adsldp/ldap.c b/dlls/adsldp/ldap.c index c23f46267e..37a990ad81 100644 --- a/dlls/adsldp/ldap.c +++ b/dlls/adsldp/ldap.c @@ -69,7 +69,7 @@ DWORD map_ldap_error(DWORD err) case LDAP_NO_OBJECT_CLASS_MODS: return ERROR_DS_CANT_MOD_OBJ_CLASS; case LDAP_RESULTS_TOO_LARGE: return ERROR_DS_OBJECT_RESULTS_TOO_LARGE; case LDAP_AFFECTS_MULTIPLE_DSAS: return ERROR_DS_AFFECTS_MULTIPLE_DSAS; - case LDAP_SERVER_DOWN: return ERROR_DS_SERVER_DOWN; + case LDAP_SERVER_DOWN: return ERROR_DS_SERVER_DOWN; case LDAP_LOCAL_ERROR: return ERROR_DS_LOCAL_ERROR; case LDAP_ENCODING_ERROR: return ERROR_DS_ENCODING_ERROR; case LDAP_DECODING_ERROR: return ERROR_DS_DECODING_ERROR; diff --git a/dlls/adsldp/tests/ldap.c b/dlls/adsldp/tests/ldap.c index aec5bf89ee..b3cb489d58 100644 --- a/dlls/adsldp/tests/ldap.c +++ b/dlls/adsldp/tests/ldap.c @@ -106,11 +106,23 @@ static void test_LDAP(void) IDispatch_Release(disp);
hr = ADsOpenObject(path, user, password, test[i].flags, &IID_IADs, (void **)&ads); + if (hr == HRESULT_FROM_WIN32(ERROR_DS_SERVER_DOWN)) + { + SysFreeString(path); + skip("server is down\n"); + break; + } ok(hr == test[i].hr || hr == test[i].hr_ads_get, "%d: got %#x, expected %#x\n", i, hr, test[i].hr); if (hr == S_OK) IADs_Release(ads);
hr = ADsGetObject(path, &IID_IDispatch, (void **)&disp); + if (hr == HRESULT_FROM_WIN32(ERROR_DS_SERVER_DOWN)) + { + SysFreeString(path); + skip("server is down\n"); + break; + } ok(hr == test[i].hr || hr == test[i].hr_ads_get, "%d: got %#x, expected %#x\n", i, hr, test[i].hr); if (hr == S_OK) IDispatch_Release(disp); @@ -337,8 +349,12 @@ todo_wine ok(hr == E_NOINTERFACE, "got %#x\n", hr);
hr = ADsGetObject(L"LDAP://ldap.forumsys.com", &IID_IDirectorySearch, (void **)&ds); + if (hr == HRESULT_FROM_WIN32(ERROR_DS_SERVER_DOWN)) + { + skip("server is down\n"); + return; + } ok(hr == S_OK, "got %#x\n", hr); - if (hr != S_OK) return;
pref.dwSearchPref = ADS_SEARCHPREF_SEARCH_SCOPE; pref.vValue.dwType = ADSTYPE_INTEGER;
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=68446
Your paranoid android.
=== build (build log) ===
error: patch failed: dlls/adsldp/adsldp.c:1338 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/adsldp/adsldp.c:1338 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/adsldp/adsldp.c:1338 Task: Patch failed to apply