Patches item #2145081, was opened at 2008-10-03 22:55
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=433166&aid=2145081&group_id=42445Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Paul Osmialowski (newchief)
Assigned to: Nobody/Anonymous (nobody)
Summary: Player-2-2: HAVE_GETADDRINFO patch
Initial Comment:
This is a proposal, this patch does not help with anything.
This patch adds #if HAVE_GETADDRINFO in every place where gethostbyname() is used, the way it was done in addr_util.c
Also this patch cleans the mess with AF_INET/PF_INET (afaik there's no guarantee both these constans are defined to be the same value on every OS in the world, so they should be used as mauals says)
Note that the way Player establishes TCP connections in many places eliminates use of IPv6. Currently it does socket() call then getaddrinfo()/gethostbyname() then connect(), while it should do something like this:
int sock = -1;
struct addrinfo * res, * res0'
snprintf(_port, sizeof _port, "%d", port);
if (!(getaddrinfo(host, _port, NULL, &res0)))
{
for (res = res0; res; res = (res->ai_next))
{
sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
if (sock < 0)
{
continue;
}
if (connect(sock, res->ai_addr, res->ai_addrlen) < 0)
{
close(sock);
sock = -1;
continue;
}
break;
}
}
if (res0) freeaddrinfo(res0);
if (sock < 0)
{
PLAYER_ERROR("Cannot connect remote host");
return FAIL;
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=433166&aid=2145081&group_id=42445-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
Playerstage-developers mailing list
Playerstage-developers@...
https://lists.sourceforge.net/lists/listinfo/playerstage-developers