[haiku-commits] Re: haiku: hrev50368 - src/kits/network/libnetapi headers/os/net

  • From: Hamish Morrison <hamishm53@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 21 Jun 2016 18:43:23 +0100

--- a/headers/os/net/NetworkAddress.h
+++ b/headers/os/net/NetworkAddress.h
@@ -149,6 +149,7 @@ private:
 private:
                        sockaddr_storage        fAddress;
                        status_t                        fStatus;
+                       BString                         fHostName;
 };

On the subject of the fix itself, adding the host name string to
BNetworkAddress just to cover this special case seems wrong to me.
BNetworkAddress should be agnostic about the host name it was resolved
from (indeed it might not even have a host name at all).

I would instead simply add a method to SecureSocket to allow setting
the hostname used for the server name indication.

Cheers,
Hamish

Other related posts: