Sean Boudreau(deleted)
|
Re: getaddrinfo fails unexpected with Invalid argument at runtime
|
Sean Boudreau(deleted)
07/15/2008 10:10 AM
post10531
|
Re: getaddrinfo fails unexpected with Invalid argument at runtime
On Tue, Jul 15, 2008 at 08:39:14AM -0400, Christian Leutloff wrote:
> The program in question is an unmodified example from the boost asio library:
>
> http://www.boost.org/doc/libs/1_35_0/doc/html/boost_asio/example/http/client/sync_client.cpp
>
> The problem is with getaddrinfo failing with the error message translated to Invalid argument. When debugging the
error code is 3/EAI_BADFLAGS.
>
> Here two getaddrinfo hints that are NOT working (the first one is the default of the ASIO library):
>
> {ai_flags = 0x400, ai_family = 2, ai_socktype = 1, ai_protocol = 6, ai_addrlen = 0, ai_canonname = 0x0, ai_addr = 0x0,
ai_next = 0x0}
> {ai_flags = 0x400, ai_family = 0, ai_socktype = 1, ai_protocol = 6, ai_addrlen = 0, ai_canonname = 0x0, ai_addr = 0x0,
ai_next = 0x0}
>
> but these ARE working:
> {ai_flags = 1, ai_family = 0, ai_socktype = 1, ai_protocol = 6, ai_addrlen = 0, ai_canonname = 0x0, ai_addr = 0x0,
ai_next = 0x0}
> {ai_flags = 0, ai_family = 0, ai_socktype = 1, ai_protocol = 6, ai_addrlen = 0, ai_canonname = 0x0, ai_addr = 0x0,
ai_next = 0x0}
>
>
> 0x400 is AI_ADDRCONFIG as defined in:
>
> netdb.h:#define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */
>
> My question is now: Where should the problem be fixed? Change the default in the lib especially for QNX (then to which
value)? Or is this a legal (so far undocumented) use of getaddinfo and will be fixed in QNX?
>
> I'm compiling on Windows using QNX 6.3.0 SP3, but the runtime is QNX 6.3.2.
>
> Thanks in advance
> Christian
AI_ALL, AI_V4MAPPED_CFG, AI_ADDRCONFIG, AI_V4MAPPED, AI_DEFAULT
were never supported and have been removed. This fix will show
up in 6.4.
-seanb
|
|
|