New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix net tests #1904

Merged
merged 3 commits into from Jan 7, 2017
Jump to file or symbol
Failed to load files and symbols.
+30 −30
Diff settings

Always

Just for now

Viewing a subset of changes. View all
Prev

tabs to spaces

  • Loading branch information...
elfprince13 committed Jan 6, 2017
commit 9773f18a888a67600d1b16945ee7da17fd427e95
@@ -78,8 +78,8 @@ struct NetAddress
bool isSameAddress(const NetAddress &other) const
{
if (type != other.type)
return false;
if (type != other.type)
return false;
switch (type)
{
@@ -102,32 +102,32 @@ struct NetAddress
bool isSameAddressAndPort(const NetAddress &other) const
{
if (type != other.type)
return false;
switch (type)
{
case NetAddress::IPAddress:
return (dMemcmp(other.address.ipv4.netNum, address.ipv4.netNum, 4) == 0) && other.port == port;
break;
case NetAddress::IPV6Address:
return (dMemcmp(other.address.ipv6.netNum, address.ipv6.netNum, 16) == 0) && other.port == port;
break;
case NetAddress::IPBroadcastAddress:
return true;
break;
case NetAddress::IPV6MulticastAddress:
return true;
break;
}
return false;
if (type != other.type)
return false;
switch (type)
{
case NetAddress::IPAddress:
return (dMemcmp(other.address.ipv4.netNum, address.ipv4.netNum, 4) == 0) && other.port == port;
break;
case NetAddress::IPV6Address:
return (dMemcmp(other.address.ipv6.netNum, address.ipv6.netNum, 16) == 0) && other.port == port;
break;
case NetAddress::IPBroadcastAddress:
return true;
break;
case NetAddress::IPV6MulticastAddress:
return true;
break;
}
return false;
}
bool isEqual(const NetAddress &other) const
{
if (type != other.type)
return false;
if (type != other.type)
return false;
switch (type)
{
@@ -193,7 +193,7 @@ struct Net
WouldBlock,
NotASocket,
UnknownError,
NeedHostLookup
NeedHostLookup
};
enum ConnectionState {
@@ -214,11 +214,11 @@ struct Net
static bool smMulticastEnabled;
static bool smIpv4Enabled;
static bool smIpv6Enabled;
static ConnectionNotifyEvent* smConnectionNotify;
static ConnectionAcceptedEvent* smConnectionAccept;
static ConnectionReceiveEvent* smConnectionReceive;
static PacketReceiveEvent* smPacketReceive;
static ConnectionNotifyEvent* smConnectionNotify;
static ConnectionAcceptedEvent* smConnectionAccept;
static ConnectionReceiveEvent* smConnectionReceive;
static PacketReceiveEvent* smPacketReceive;
static bool init();
ProTip! Use n and p to navigate between commits in a pull request.