diff options
author | Alexey Efimov <xeno@prnwatch.com> | 2022-02-10 16:49:41 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:41 +0300 |
commit | 26e0e4fb5e5cd6b4d7f4c21f9fcd7978891bf946 (patch) | |
tree | d34555f21d4d9f94f84d460e55b77d7eb41a953c /util/network/address.cpp | |
parent | ca3252a147a429eac4ba8221857493c58dcd09b5 (diff) | |
download | ydb-26e0e4fb5e5cd6b4d7f4c21f9fcd7978891bf946.tar.gz |
Restoring authorship annotation for Alexey Efimov <xeno@prnwatch.com>. Commit 1 of 2.
Diffstat (limited to 'util/network/address.cpp')
-rw-r--r-- | util/network/address.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/network/address.cpp b/util/network/address.cpp index a81a9e6994..08fc8139ee 100644 --- a/util/network/address.cpp +++ b/util/network/address.cpp @@ -140,16 +140,16 @@ IRemoteAddrPtr NAddr::GetSockAddr(SOCKET s) { return addr; } -IRemoteAddrPtr NAddr::GetPeerAddr(SOCKET s) { - auto addr = MakeHolder<TOpaqueAddr>(); - - if (getpeername(s, addr->MutableAddr(), addr->LenPtr()) < 0) { - ythrow TSystemError() << "getpeername() failed"; - } - - return addr; -} - +IRemoteAddrPtr NAddr::GetPeerAddr(SOCKET s) { + auto addr = MakeHolder<TOpaqueAddr>(); + + if (getpeername(s, addr->MutableAddr(), addr->LenPtr()) < 0) { + ythrow TSystemError() << "getpeername() failed"; + } + + return addr; +} + static const in_addr& InAddr(const IRemoteAddr& addr) { return ((const sockaddr_in*)addr.Addr())->sin_addr; } |