dpnet: Always update type since it might change.
This commit is contained in:
parent
4299da0d7c
commit
b779dee768
|
@ -442,7 +442,6 @@ static HRESULT WINAPI IDirectPlay8AddressImpl_AddComponent(IDirectPlay8Address *
|
||||||
/* Create a new one */
|
/* Create a new one */
|
||||||
entry = heap_alloc(sizeof(struct component));
|
entry = heap_alloc(sizeof(struct component));
|
||||||
entry->name = heap_strdupW(pwszName);
|
entry->name = heap_strdupW(pwszName);
|
||||||
entry->type = dwDataType;
|
|
||||||
|
|
||||||
list_add_tail(&This->components, &entry->entry);
|
list_add_tail(&This->components, &entry->entry);
|
||||||
}
|
}
|
||||||
|
@ -472,6 +471,7 @@ static HRESULT WINAPI IDirectPlay8AddressImpl_AddComponent(IDirectPlay8Address *
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
entry->type = dwDataType;
|
||||||
entry->size = dwDataSize;
|
entry->size = dwDataSize;
|
||||||
|
|
||||||
return DPN_OK;
|
return DPN_OK;
|
||||||
|
|
|
@ -125,7 +125,7 @@ static void address_addcomponents(void)
|
||||||
size = sizeof(buffer);
|
size = sizeof(buffer);
|
||||||
hr = IDirectPlay8Address_GetComponentByName(localaddr, DPNA_KEY_HOSTNAME, buffer, &size, &type);
|
hr = IDirectPlay8Address_GetComponentByName(localaddr, DPNA_KEY_HOSTNAME, buffer, &size, &type);
|
||||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
todo_wine ok(type == DPNA_DATATYPE_STRING, "incorrect type %d\n", type);
|
ok(type == DPNA_DATATYPE_STRING, "incorrect type %d\n", type);
|
||||||
todo_wine ok(!lstrcmpW(buffer, localhost), "Invalid string: %s\n", wine_dbgstr_w(buffer));
|
todo_wine ok(!lstrcmpW(buffer, localhost), "Invalid string: %s\n", wine_dbgstr_w(buffer));
|
||||||
|
|
||||||
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_PORT, &port, sizeof(DWORD)+2, DPNA_DATATYPE_DWORD);
|
hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_PORT, &port, sizeof(DWORD)+2, DPNA_DATATYPE_DWORD);
|
||||||
|
|
Loading…
Reference in New Issue