Skip to content

Commit

Permalink
abandoning the thread
Browse files Browse the repository at this point in the history
  • Loading branch information
ronen-fr committed Sep 5, 2019
1 parent 2c364e9 commit 80e6d82
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/net/stack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ socket_address::socket_address(const ipv6_addr& addr)
std::copy(addr.ip.begin(), addr.ip.end(), u.in6.sin6_addr.s6_addr);
}

socket_address::socket_address(const ud_addr& addr)
socket_address::socket_address(const unix_domain_addr& addr)
{
u.un.sun_family = AF_UNIX;

Expand All @@ -200,7 +200,7 @@ socket_address::socket_address(const ud_addr& addr)
strncpy(u.un.sun_path, addr.sfile_.c_str(), sizeof(u.un.sun_path)-1);
u.un.sun_path[sizeof(u.un.sun_path)-1] = '\0';
}

socket_address::socket_address(uint32_t ipv4, uint16_t p)
: socket_address(make_ipv4_address(ipv4, p))
{}
Expand All @@ -209,6 +209,10 @@ bool socket_address::operator==(const socket_address& a) const {
if (u.sa.sa_family != a.u.sa.sa_family) {
return false;
}
if (u.sa.sa_family == AF_UNIX) {
// no support yet for abstract-namespace u.d. sockets
return !strcmp(u.un.sun_path, a.u.un.sun_path);
}
if (u.in.sin_port != a.u.in.sin_port) {
return false;
}
Expand Down

0 comments on commit 80e6d82

Please sign in to comment.