From 1c62023701e174b5903110195259f01afdae8ca5 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 29 Jul 2015 15:00:53 -0400 Subject: [PATCH] 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... --- src/kits/network/libnetapi/NetworkAddress.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kits/network/libnetapi/NetworkAddress.cpp b/src/kits/network/libnetapi/NetworkAddress.cpp index 0556bb4268..57de4bc774 100644 --- a/src/kits/network/libnetapi/NetworkAddress.cpp +++ b/src/kits/network/libnetapi/NetworkAddress.cpp @@ -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; }