Skip to content

Commit

Permalink
Fix support for Windows XP applications
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunderlandkyl committed Oct 13, 2017
1 parent 11a66a2 commit e84b8be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/igtlGeneralSocket.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ namespace igtl
dest.sin_family = AF_INET;

// store this IP address in dest:
inet_pton(AF_INET, this->IPAddress, &(dest.sin_addr));
dest.sin_addr.s_addr = inet_addr(this->IPAddress);
dest.sin_port = htons(this->PortNum);

int n = sendto(this->m_SocketDescriptor, (char*)data, length, 0, (struct sockaddr*)&dest, sizeof dest);
Expand Down
3 changes: 1 addition & 2 deletions Source/igtlUDPServerSocket.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ UDPServerSocket::~UDPServerSocket()
bool UDPServerSocket::IsMulticastAddreesValid(const char* add)
{
//224.0.0.0 through 224.0.0.255, are not routable
igtl_uint32 address;
inet_pton(AF_INET, add, &(address));// to do: make sure the endian is correct
igtl_uint32 address = inet_addr(add); // to do: make sure the endian is correct
if(igtl_is_little_endian())
{
address = BYTE_SWAP_INT32(address);
Expand Down

0 comments on commit e84b8be

Please sign in to comment.