Re: OPENSOCKETFUNCTION hook not called for all socket creations on Windows
Date: Wed, 04 Jan 2012 10:17:52 +0100
Am 03.01.2012, 16:32 Uhr, schrieb Daniel Stenberg <daniel_at_haxx.se>:
> On Wed, 28 Dec 2011, Daniel Stenberg wrote:
>> I think working harder to completely get rid of it is a better idea.
> Hi all! I haven't dropped this subject completely.
> Here's my suggested patch that simply removes the use of the dummy
> socket in the win32 version of the threaded resolver.
> Again: I can't test this, written "blindly".
I tested your change on my application. My application runs fine.
But I couldn't figure out yet how to run the unit-tests on windows
(it is a pain to get it running on windows), but I assume some of
them will fail with just looking at the code.
If you do a full-text search for curl_multi_fdset you will see that
that nearly nowhere is checked if the maxfd return value is -1.
Actually select is used in this case as a plain sleep. But this WILL
fail on windows, because select returns an error if no sockets are
These are the cases which I found which could be problematic:
lib/easy.c with CURL_MULTIEASY defined
It looks like these example use a copy&pasted code-snippet with
Only one example does it the way it's supposed to be:
As I said I did not test it, but only looked at the code, but now it
is your choice if it is okay that the change might break existing
programs who used and extended the examples provided with curl.
Personally I am fine with that change and as it was documented that
way all the time, the users should fix their programs.
List admin: http://cool.haxx.se/list/listinfo/curl-library
Received on 2012-01-04