diff options
author | damien <damien@yandex-team.ru> | 2022-02-10 16:50:29 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:29 +0300 |
commit | 5d4e7b7c923852e0f6398791ec98a60cf9faab46 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 | |
parent | 172dad1c62209f2cfa9cb5ae4fe10a21ac1cfe61 (diff) | |
download | ydb-5d4e7b7c923852e0f6398791ec98a60cf9faab46.tar.gz |
Restoring authorship annotation for <damien@yandex-team.ru>. Commit 2 of 2.
-rw-r--r-- | library/cpp/messagebus/locator.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/messagebus/locator.cpp b/library/cpp/messagebus/locator.cpp index 3d752aeb3a..e38a35c426 100644 --- a/library/cpp/messagebus/locator.cpp +++ b/library/cpp/messagebus/locator.cpp @@ -311,7 +311,7 @@ namespace NBus { return port; } - + int TBusLocator::GetLocalAddresses(TBusService service, TVector<TNetAddr>& addrs) { TGuard<TMutex> G(Lock); TServiceId serviceId = GetServiceId(service); @@ -322,19 +322,19 @@ namespace NBus { if (item.ServiceId != serviceId) { break; } - + if (IsLocal(item.Addr)) { addrs.push_back(item.Addr); } } - + if (addrs.size() == 0) { return -1; - } - + } + return (int)addrs.size(); - } - + } + int TBusLocator::LocateHost(TBusService service, TBusKey key, TString* host, int* port, bool* isLocal) { int ret; TNetAddr addr; @@ -342,7 +342,7 @@ namespace NBus { if (ret != 0) { return ret; } - + { TGuard<TMutex> G(Lock); THostAddrMap::const_iterator it = HostAddrMap.find(addr); |