We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2103 - Wrong IP addresses from SDLNet_GetLocalAddresses
Summary: Wrong IP addresses from SDLNet_GetLocalAddresses
Status: RESOLVED FIXED
Alias: None
Product: SDL_net
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86_64 Windows 7
: P2 normal
Assignee: Sam Lantinga
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-17 22:48 UTC by Mārtiņš Možeiko
Modified: 2013-09-28 06:27 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mārtiņš Možeiko 2013-09-17 22:48:33 UTC
On Windows IP address list returned by SDLNet_GetLocalAddresses function returns IP address of first adapter for all adapters.

Instead of:

for (pAddress = &pAdapterInfo->IpAddressList; pAddress; pAddress = pAddress->Next) {

There should be this:

for (pAddress = &pAdapter->IpAddressList; pAddress; pAddress = pAddress->Next) {
Comment 1 Sam Lantinga 2013-09-28 06:27:02 UTC
Good catch, thanks!
http://hg.libsdl.org/SDL_net/rev/c98cd1a60729