Skip to content

Commit

Permalink
BNetworkAddress: Address review comments.
Browse files Browse the repository at this point in the history
Thanks Axel and Rene!
  • Loading branch information
waddlesplash committed Jul 28, 2015
1 parent 71b756a commit d682f9f
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions src/kits/network/libnetapi/NetworkAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ BNetworkAddress::Unset()
{
fAddress.ss_family = AF_UNSPEC;
fAddress.ss_len = 2;
fStatus = B_OK;
fStatus = B_NO_INIT;
}


Expand All @@ -177,8 +177,10 @@ BNetworkAddress::SetTo(const char* host, uint16 port, uint32 flags)

cookie = 0;
status = resolver->GetNextAddress(&cookie, *this);
if (status == B_OK)
fStatus = B_OK;
if (status != B_OK) {
Unset();
fStatus = status;
}
return status;
}

Expand All @@ -205,8 +207,10 @@ BNetworkAddress::SetTo(const char* host, const char* service, uint32 flags)

cookie = 0;
status = resolver->GetNextAddress(&cookie, *this);
if (status == B_OK)
fStatus = B_OK;
if (status != B_OK) {
Unset();
fStatus = status;
}
return status;
}

Expand All @@ -231,8 +235,10 @@ BNetworkAddress::SetTo(int family, const char* host, uint16 port, uint32 flags)

uint32 cookie = 0;
status = resolver->GetNextAddress(&cookie, *this);
if (status == B_OK)
fStatus = B_OK;
if (status != B_OK) {
Unset();
fStatus = status;
}
return status;
}

Expand All @@ -258,8 +264,10 @@ BNetworkAddress::SetTo(int family, const char* host, const char* service,

uint32 cookie = 0;
status = resolver->GetNextAddress(&cookie, *this);
if (status == B_OK)
fStatus = B_OK;
if (status != B_OK) {
Unset();
fStatus = status;
}
return status;
}

Expand Down

0 comments on commit d682f9f

Please sign in to comment.