On 04.07.2016 07:25, Alex Henrie wrote:
> Cc: Christian Costa <titan.costa(a)gmail.com>
> Cc: Sebastian Lackner <sebastian(a)fds-team.de>
>
> Wine Staging has included a similar patch since 1.7.51, however this
> patch is not based on theirs.
Actually the patch looks very similar, but this is probably caused by
the fact that you both wrote it based on existing code.
>
> FolderItems2 worked in Windows 2000, but it was removed when
> FolderItems3 was introduced in Windows XP. However, it doesn't hurt us
> to provide this interface anyway for any old applications that might
> want it.
>
> Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
> ---
> dlls/shell32/shell32_main.h | 1 +
> dlls/shell32/shelldispatch.c | 207 ++++++++++++++++++++++++++++++++++++++++++-
> 2 files changed, 206 insertions(+), 2 deletions(-)
>
Some of the variable names (for example ppTInfo, rgszNames, rgDispId) sound
a bit odd. Usually variable names without ugly prefix are preferred for new
code (except we want to keep it for compatibility with old code here?).
> +static HRESULT WINAPI FolderItemsImpl_Item(FolderItems3 *iface, VARIANT index, FolderItem **ppid)
> +{
> + FIXME("(%p,%p)\n", iface, ppid);
You forgot to trace the index parameter here.
> +
> + return E_NOTIMPL;
> +}
[...]
> @@ -1093,8 +1297,7 @@ static HRESULT WINAPI FolderImpl_Items(Folder3 *iface, FolderItems **ppid)
> {
> FIXME("(%p,%p)\n", iface, ppid);
You forgot to change the FIXME to a TRACE.
>
> - *ppid = NULL;
> - return E_NOTIMPL;
> + return FolderItems_Constructor(ppid);
> }
>
> static HRESULT WINAPI FolderImpl_ParseName(Folder3 *iface, BSTR name, FolderItem **item)
>
On Mon, Jul 4, 2016 at 6:35 AM, Matthieu Nottale
<matthieu.nottale(a)infinit.io> wrote:
> IP dual stack (v4+v6) should be disabled by default, but previous code
> was setting IPV6_V6ONLY in bind() which prevented user to override it.
> This patch moves setting IPV6_V6ONLY to socket creation time.
Hi, thanks for the updated version. I believe the patch failed to
apply because you added text after it and also an attachment which is
inlined while the email is being parsed. The result you can see at
[1].
The subject should show how many attempts the patch was sent to, so
next subject should be:
[PATCH] ws2_32: Allow user to enable IP dual stack (v3)
Please see some nitpicks below.
[1] http://source.winehq.org/patches/data/123921
> Signed-off-by: Matthieu Nottale <matthieu.nottale(a)infinit.io>
> ---
> dlls/ws2_32/socket.c | 22 ++++++++--------------
> dlls/ws2_32/tests/sock.c | 40 ++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 48 insertions(+), 14 deletions(-)
>
> diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
> index b0af3d7..c29bd2b 100644
> --- a/dlls/ws2_32/socket.c
> +++ b/dlls/ws2_32/socket.c
> @@ -3240,20 +3240,6 @@ int WINAPI WS_bind(SOCKET s, const struct
> WS_sockaddr* name, int namelen)
> }
> else
> {
> -#ifdef IPV6_V6ONLY
> - const struct sockaddr_in6 *in6 = (const struct
> sockaddr_in6*) &uaddr;
> - if (name->sa_family == WS_AF_INET6 &&
> - !memcmp(&in6->sin6_addr, &in6addr_any, sizeof(struct
> in6_addr)))
> - {
> - int enable = 1;
> - if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &enable,
> sizeof(enable)) == -1)
> - {
> - release_sock_fd( s, fd );
> - SetLastError(WSAEAFNOSUPPORT);
> - return SOCKET_ERROR;
> - }
> - }
> -#endif
> if (name->sa_family == WS_AF_INET)
> {
> struct sockaddr_in *in4 = (struct sockaddr_in*) &uaddr;
> @@ -7163,6 +7149,14 @@ SOCKET WINAPI WSASocketW(int af, int type, int
> protocol,
> TRACE("\tcreated %04lx\n", ret );
> if (ipxptype > 0)
> set_ipx_packettype(ret, ipxptype);
> +#ifdef IPV6_V6ONLY
> + if (unixaf == AF_INET6)
> + {
> + /* Winsock documentation stipulates that IPV6_V6ONLY is enabled
> by default*/
The documentation is not always useful (and sometimes wrong) and now
we should have a test to back this up, I believe a better comment to
be:
/* AF_INET6 sockets have IPV6_V6ONLY enabled by default. */
Watch out for missing space between the last comment word and the */
> + int enable = 1;
> + WS_setsockopt(ret, WS_IPPROTO_IPV6, WS_IPV6_V6ONLY, &enable,
> sizeof(enable));
> + }
> +#endif
> return ret;
> }
>
> diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
> index 6853279..7c8d834 100644
> --- a/dlls/ws2_32/tests/sock.c
> +++ b/dlls/ws2_32/tests/sock.c
> @@ -6114,6 +6114,46 @@ static void test_ipv6only(void)
> ok(!ret, "Could not bind IPv4 address (LastError: %d; %d expected if
> IPv6 binds to IPv4 as well).\n",
> WSAGetLastError(), WSAEADDRINUSE);
>
> + if (v4 != INVALID_SOCKET)
> + closesocket(v4);
> + if (v6 != INVALID_SOCKET)
> + closesocket(v6);
> +
> + /* Test again, this time disabling V6ONLY*/
> + v6 = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP);
> + if (v6 == INVALID_SOCKET) {
> + skip("Could not create IPv6 socket (LastError: %d; %d expected if
> IPv6 not available).\n",
> + WSAGetLastError(), WSAEAFNOSUPPORT);
> + goto end;
> + }
Do a getsockopt at this point to check what is the default enabled
value. Set enabled to the opposite of what you expected before the
call and test its value after.
> + DWORD enabled = 0;
> + int len = sizeof(enabled);
You cannot declare variables like this in C89 (?) so do it in the
function beginning.
> + ret = setsockopt(v6, IPPROTO_IPV6, IPV6_V6ONLY, &enabled, len);
> + if (ret) {
> + ok(!ret, "Failed to disable IPV6_V6ONLY (LastError: %d).\n",
> WSAGetLastError());
> + goto end;
> + }
I understand that you are trying to skip when IPV6_V6ONLY is not
present. It will be better if you catch the explicit error case and
bail out, something like:
WSASetLastError(0xdeadbeef);
ret = setsockopt(v6, IPPROTO_IPV6, IPV6_V6ONLY, &enabled, len);
error = WSAGetLastError();
if (ret) {
ok(error == EXPECTED_ERROR, "Failed to disable IPV6_V6ONLY
(LastError %d, %d expected).\n", error, EXPECTED_ERROR);
goto end;
}
> ...
Best wishes,
Bruno
Hi,
While running your changed tests on Windows, 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=23959
Your paranoid android.
=== build (build) ===
Patch failed to apply
Hi,
While running your changed tests on Windows, 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=23946
Your paranoid android.
=== w2008s64 (32 bit msvcr120) ===
msvcr120.c:706: Test failed: env.status = 0
=== w2008s64 (64 bit msvcr120) ===
msvcr120.c:706: Test failed: env.status = 10
Hi,
While running your changed tests on Windows, 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=23944
Your paranoid android.
=== wxppro (32 bit eventlog) ===
eventlog.c:1224: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1235: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1264: Test failed: Expected success
eventlog.c:1272: Test failed: Expected ERROR_ALREADY_EXISTS, got 161
=== w2003std (32 bit eventlog) ===
eventlog.c:1224: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1235: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1264: Test failed: Expected success
eventlog.c:1272: Test failed: Expected ERROR_ALREADY_EXISTS, got 161
=== wvistau64 (32 bit eventlog) ===
eventlog.c:1224: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1235: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1264: Test failed: Expected success
eventlog.c:1272: Test failed: Expected ERROR_ALREADY_EXISTS, got 161
=== w2008s64 (32 bit eventlog) ===
eventlog.c:1224: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1235: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1264: Test failed: Expected success
eventlog.c:1272: Test failed: Expected ERROR_ALREADY_EXISTS, got 161
=== w7u (32 bit eventlog) ===
eventlog.c:1224: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1235: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1264: Test failed: Expected success
eventlog.c:1272: Test failed: Expected ERROR_ALREADY_EXISTS, got 161
=== w7pro64 (32 bit eventlog) ===
eventlog.c:1224: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1235: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1264: Test failed: Expected success
eventlog.c:1272: Test failed: Expected ERROR_ALREADY_EXISTS, got 161
=== w8 (32 bit eventlog) ===
eventlog.c:1224: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1235: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1264: Test failed: Expected success
eventlog.c:1272: Test failed: Expected ERROR_ALREADY_EXISTS, got 161
=== w864 (32 bit eventlog) ===
eventlog.c:1224: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1235: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1264: Test failed: Expected success
eventlog.c:1272: Test failed: Expected ERROR_ALREADY_EXISTS, got 161
=== w1064 (32 bit eventlog) ===
eventlog.c:1224: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1235: Test failed: Expected ERROR_INVALID_PARAMETER, got 161
eventlog.c:1264: Test failed: Expected success
eventlog.c:1272: Test failed: Expected ERROR_ALREADY_EXISTS, got 161
On 2016-07-03 11:55 AM, Stefan Dösinger wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Am 2016-07-03 um 10:04 schrieb Henri Verbeet:
>> Finally, there the possibility that Windows filters invalid flag
>> combinations like Wine currently does, and picking either DISCARD
>> or NOOVERWRITE will break an application that depends on that.
> When I originally added support for dynamic buffers in 2010 or so I
> just forwarded the flags to the driver. That did break some
> applications. I'll try to find out which one it was, I believe I put
> some details in the patch description.
>
> It's also possible that there are some differences between textures
> and buffers. In d3d <= 9, D3DLOCK_NOOVERWRITE is not supported on
> textures. So it might be filtered out, and DISCARD prevails. But my
> understanding is that Unigine uses the questionable combination on
> buffers, not textures.
>
It uses both flags on buffers in d3d9 mode.
I'm going to add tests for it.
Regards,
Patrick
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQIcBAEBCAAGBQJXeOEWAAoJEN0/YqbEcdMwBRQP/jsjUZXuKbUeoh3iaorwY02B
> qZXhtc2IbQlZt2989jAGIjuZoCtE2sP8oRkmtbGI3nfIthOxFKrwcPKnqYiz40aF
> JqCqYiwMNSpcqDKEhC92w8ad4F8AMBIG/4IUVBtU/uL0W2fBKNJ0rKE4v2sNefo1
> OTa0ZCtUSCbvErO9xgen43KparIRNK1juxlkE7CVHkWwK3oBl8GO+IzJ6ZKSN54A
> ftz48C7if3y0ul2Xs/HVC/J3UqnksgL1sRnxUeDrFC6MRsNQZaf0D3Gn9vUdqukt
> t+hxArnt6DEgMiPlbh3Zhoso4lNzoJJxPpldmWYAgEiU5l6BqVnvSuDUzZZGjLqz
> 8dg0QEzjDbta5rLwMi6NnZxTYinx8F61YMOUSfMIkKofz4Xc7v2TnEsgMRI9XuoV
> f9KZVssvpYoBuQHI0qEpK4eEBqlU/ZtFh39O+j13980Z6wNtnCQVYUtMcY8hU8Nv
> kf5iN/eOuMVrMV6EKqZswJe1CHfAfhVhLfD9kOMRREb5MjrAVyreigbHR/RXG3BH
> K9bWwCnnaVfQDtJzUw9ab+e+uSbkkiymjrkWY8JKI3E0d8YBnupxS8GcwJTT0y0t
> x5K/Fzp/a2U+x4FV8MZewIhT4azA+DEsgHi/6dviRi6/8ct6J4TTZZqCRKtgWFBy
> O8waYy1TvNoBQETnhMaC
> =7Pmz
> -----END PGP SIGNATURE-----