Commit 4cdc3336 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

adsldp: Initialize also pADsValues->dwType field.

parent f0f24b4b
...@@ -1345,6 +1345,7 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex ...@@ -1345,6 +1345,7 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
TRACE("=> %s\n", debugstr_w(values[i])); TRACE("=> %s\n", debugstr_w(values[i]));
col->pADsValues[i].dwType = type;
col->pADsValues[i].u.CaseIgnoreString = values[i]; col->pADsValues[i].u.CaseIgnoreString = values[i];
} }
...@@ -1371,6 +1372,8 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex ...@@ -1371,6 +1372,8 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
col->pADsValues[i].dwType = type;
if (wcsicmp(values[i], L"TRUE")) if (wcsicmp(values[i], L"TRUE"))
col->pADsValues[i].u.Boolean = 1; col->pADsValues[i].u.Boolean = 1;
else if (wcsicmp(values[i], L"FALSE")) else if (wcsicmp(values[i], L"FALSE"))
...@@ -1436,6 +1439,7 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex ...@@ -1436,6 +1439,7 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
TRACE("=> %s\n", debugstr_an(values[i]->bv_val, values[i]->bv_len)); TRACE("=> %s\n", debugstr_an(values[i]->bv_val, values[i]->bv_len));
col->pADsValues[i].dwType = type;
col->pADsValues[i].u.OctetString.dwLength = values[i]->bv_len; col->pADsValues[i].u.OctetString.dwLength = values[i]->bv_len;
col->pADsValues[i].u.OctetString.lpValue = (BYTE *)values[i]->bv_val; col->pADsValues[i].u.OctetString.lpValue = (BYTE *)values[i]->bv_val;
} }
...@@ -1489,6 +1493,7 @@ static HRESULT WINAPI search_GetColumn(IDirectorySearch *iface, ADS_SEARCH_HANDL ...@@ -1489,6 +1493,7 @@ static HRESULT WINAPI search_GetColumn(IDirectorySearch *iface, ADS_SEARCH_HANDL
wcscat(col->pADsValues[0].u.CaseIgnoreString, ldap->host); wcscat(col->pADsValues[0].u.CaseIgnoreString, ldap->host);
wcscat(col->pADsValues[0].u.CaseIgnoreString, L"/"); wcscat(col->pADsValues[0].u.CaseIgnoreString, L"/");
if (dn) wcscat(col->pADsValues[0].u.CaseIgnoreString, dn); if (dn) wcscat(col->pADsValues[0].u.CaseIgnoreString, dn);
col->pADsValues[0].dwType = ADSTYPE_CASE_IGNORE_STRING;
col->dwADsType = ADSTYPE_CASE_IGNORE_STRING; col->dwADsType = ADSTYPE_CASE_IGNORE_STRING;
col->dwNumValues = 1; col->dwNumValues = 1;
col->pszAttrName = strdupW(name); col->pszAttrName = strdupW(name);
......
...@@ -271,6 +271,8 @@ static void do_search(const struct search *s) ...@@ -271,6 +271,8 @@ static void do_search(const struct search *s)
for (i = 0; i < col.dwNumValues; i++) for (i = 0; i < col.dwNumValues; i++)
{ {
ok(col.pADsValues[i].dwType == col.dwADsType, "%u: got %d for %s\n", i, col.pADsValues[i].dwType, wine_dbgstr_w(name));
ok(res->values[i] != NULL, "expected to have more values for %s\n", wine_dbgstr_w(name)); ok(res->values[i] != NULL, "expected to have more values for %s\n", wine_dbgstr_w(name));
if (!res->values[i]) break; if (!res->values[i]) break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment