NetworkAddress: Fix things yet again.

If I had used my head instead of blindly c&p'ing the suggested code
from Axel's message, I would have realized that Unset() unsets fStatus
too. Not a bright thing to do on my part...
This commit is contained in:
Augustin Cavalier 2015-07-29 15:00:53 -04:00
parent 1690d2f4dd
commit 1c62023701
1 changed files with 4 additions and 4 deletions

View File

@ -177,9 +177,9 @@ BNetworkAddress::SetTo(const char* host, uint16 port, uint32 flags)
cookie = 0;
status = resolver->GetNextAddress(&cookie, *this);
fStatus = status;
if (status != B_OK)
Unset();
fStatus = status;
return status;
}
@ -206,9 +206,9 @@ BNetworkAddress::SetTo(const char* host, const char* service, uint32 flags)
cookie = 0;
status = resolver->GetNextAddress(&cookie, *this);
fStatus = status;
if (status != B_OK)
Unset();
fStatus = status;
return status;
}
@ -233,9 +233,9 @@ BNetworkAddress::SetTo(int family, const char* host, uint16 port, uint32 flags)
uint32 cookie = 0;
status = resolver->GetNextAddress(&cookie, *this);
fStatus = status;
if (status != B_OK)
Unset();
fStatus = status;
return status;
}
@ -261,9 +261,9 @@ BNetworkAddress::SetTo(int family, const char* host, const char* service,
uint32 cookie = 0;
status = resolver->GetNextAddress(&cookie, *this);
fStatus = status;
if (status != B_OK)
Unset();
fStatus = status;
return status;
}