Re: [PATCH 3/3] iphlpapi: Implement CancelIPChangeNotify.

2013-05-13 Thread Hans Leidekker
On Fri, 2013-05-10 at 20:07 -0600, Erich E. Hoover wrote: +/*** + * IPHLPAPI_createmonitorhandle (INTERNAL) + * + * Routine to create the interface monitoring handle for NotifyAddrChange requests. + */

Re: [PATCH 3/3] iphlpapi: Implement CancelIPChangeNotify.

2013-05-13 Thread Erich E. Hoover
On Mon, May 13, 2013 at 3:45 AM, Hans Leidekker h...@codeweavers.com wrote: ... I don't see why you're still using these defines. It's unlikely that this code will work if NETLINK_ROUTE is defined but RTMGRP_IPV4_IFADDR isn't, for example. If there are versions of the netlink headers that

Re: [PATCH 3/3] iphlpapi: Implement CancelIPChangeNotify (try 2).

2013-05-13 Thread Marvin
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 http://testbot.winehq.org/JobDetails.pl?Key=25553 Your paranoid

Re: [PATCH 3/3] iphlpapi: Implement CancelIPChangeNotify.

2013-05-11 Thread Erich E. Hoover
On Fri, May 10, 2013 at 8:27 AM, Hans Leidekker h...@codeweavers.com wrote: ... I think it would be nicer to push the platform specifics to helper functions (e.g. setting up the socket or checking for an address change) and use the usual header defines (HAVE_LINUX_NETLINK_H and/or

Re: [PATCH 3/3] iphlpapi: Implement CancelIPChangeNotify.

2013-05-10 Thread Hans Leidekker
On Wed, 2013-05-08 at 15:34 -0600, Erich E. Hoover wrote: +#ifdef HAVE_LINUX_NETLINK_H +# include linux/netlink.h +#endif +#ifdef HAVE_LINUX_RTNETLINK_H +# include linux/rtnetlink.h +#endif + +#ifdef NLMSG_OK +# define WINE_LINKMON_FAMILY PF_NETLINK +# define WINE_LINKMON_TYPE

Re: [PATCH 3/3] iphlpapi: Implement CancelIPChangeNotify.

2013-05-10 Thread Erich E. Hoover
On Fri, May 10, 2013 at 3:48 AM, Hans Leidekker h...@codeweavers.com wrote: On Wed, 2013-05-08 at 15:34 -0600, Erich E. Hoover wrote: ... +#ifdef NLMSG_OK +# define WINE_LINKMON_FAMILY PF_NETLINK +# define WINE_LINKMON_TYPE SOCK_RAW +# define WINE_LINKMON_PROTO

Re: [PATCH 3/3] iphlpapi: Implement CancelIPChangeNotify.

2013-05-10 Thread Hans Leidekker
On Fri, 2013-05-10 at 08:00 -0600, Erich E. Hoover wrote: On Fri, May 10, 2013 at 3:48 AM, Hans Leidekker h...@codeweavers.com wrote: On Wed, 2013-05-08 at 15:34 -0600, Erich E. Hoover wrote: ... +#ifdef NLMSG_OK +# define WINE_LINKMON_FAMILY PF_NETLINK +# define

Re: [PATCH 3/3] iphlpapi: Implement CancelIPChangeNotify.

2013-05-08 Thread Erich E. Hoover
On Tue, May 7, 2013 at 12:26 PM, Hans Leidekker h...@codeweavers.com wrote: ... It's a system-wide event so the server seems to be a pretty good candidate to handle it, and it wouldn't need any extra threads. ... Ok, how about something like the attached? (I assume the first patch is OK)

Re: [PATCH 3/3] iphlpapi: Implement CancelIPChangeNotify.

2013-05-07 Thread Hans Leidekker
On Mon, 2013-05-06 at 19:23 -0600, Erich E. Hoover wrote: --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -210,8 +210,14 @@ DWORD WINAPI AllocateAndGetIpAddrTableFromStack(PMIB_IPADDRTABLE *ppIpAddrTable, */ BOOL WINAPI CancelIPChangeNotify(LPOVERLAPPED

Re: [PATCH 3/3] iphlpapi: Implement CancelIPChangeNotify.

2013-05-07 Thread Erich E. Hoover
On Tue, May 7, 2013 at 3:14 AM, Hans Leidekker h...@codeweavers.com wrote: ... TerminateThread is not the right tool here. If the thread is blocked on the recv call while being terminated it will leak the netlink socket. You'd need a way to synchronize the threads, but an overhead of one

Re: [PATCH 3/3] iphlpapi: Implement CancelIPChangeNotify.

2013-05-07 Thread Hans Leidekker
On Tue, 2013-05-07 at 10:04 -0600, Erich E. Hoover wrote: On Tue, May 7, 2013 at 3:14 AM, Hans Leidekker h...@codeweavers.com wrote: ... TerminateThread is not the right tool here. If the thread is blocked on the recv call while being terminated it will leak the netlink socket. You'd