diff options
| author | chernyak <[email protected]> | 2022-02-10 16:50:29 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:50:29 +0300 | 
| commit | f2b67f65c49b38a882b6407926cece6fe49bd066 (patch) | |
| tree | 5d4950c1a76b6c6384f8e55192f14f4af1132632 | |
| parent | 4bac7bacd041dac72ece081598805d03d2e80a3e (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
| -rw-r--r-- | library/cpp/messagebus/locator.cpp | 26 | ||||
| -rw-r--r-- | library/cpp/messagebus/oldmodule/module.cpp | 10 | ||||
| -rw-r--r-- | library/cpp/messagebus/oldmodule/module.h | 6 | ||||
| -rw-r--r-- | library/cpp/messagebus/session.cpp | 2 | ||||
| -rw-r--r-- | library/cpp/messagebus/test/helper/example.h | 4 | ||||
| -rw-r--r-- | library/cpp/messagebus/test/perftest/perftest.cpp | 2 | ||||
| -rw-r--r-- | library/cpp/messagebus/test/ut/one_way_ut.cpp | 6 | 
7 files changed, 28 insertions, 28 deletions
diff --git a/library/cpp/messagebus/locator.cpp b/library/cpp/messagebus/locator.cpp index e38a35c426f..e7e12440601 100644 --- a/library/cpp/messagebus/locator.cpp +++ b/library/cpp/messagebus/locator.cpp @@ -136,7 +136,7 @@ namespace NBus {      TBusLocator::TServiceId TBusLocator::GetServiceId(const char* name) {          const char* c = ServiceIdSet.insert(name).first->c_str();          return (ui64)c; -    } +    }       int TBusLocator::RegisterBreak(TBusService service, const TVector<TBusKey>& starts, const TNetAddr& addr) {          TGuard<TMutex> G(Lock); @@ -261,16 +261,16 @@ namespace NBus {              const TItem& item = *it;              addrs.push_back(item.Addr);          } - +           if (addrs.size() == 0) {              return -1;          }          return (int)addrs.size(); -    } +    }       int TBusLocator::Locate(TBusService service, TBusKey key, TNetAddr* addr) {          TGuard<TMutex> G(Lock); - +           TServiceId serviceId = GetServiceId(service);          TItems::const_iterator it; @@ -299,7 +299,7 @@ namespace NBus {              if (item.ServiceId != serviceId) {                  break;              } - +               if (IsLocal(item.Addr)) {                  if (port != 0 && port != GetAddrPort(item.Addr)) {                      Y_ASSERT(0 && "Can't decide which port to use."); @@ -308,15 +308,15 @@ namespace NBus {                  port = GetAddrPort(item.Addr);              }          } - +           return port; -    } +    }       int TBusLocator::GetLocalAddresses(TBusService service, TVector<TNetAddr>& addrs) {          TGuard<TMutex> G(Lock);          TServiceId serviceId = GetServiceId(service);          TItems::const_iterator it; - +           for (it = Items.lower_bound(TItem(serviceId, 0, 0, TNetAddr())); it != Items.end(); ++it) {              const TItem& item = *it;              if (item.ServiceId != serviceId) { @@ -386,7 +386,7 @@ namespace NBus {          }          Register(service, start, end, addr);          return 0; -    } +    }       int TBusLocator::Register(TBusService service, TBusKey start, TBusKey end, const TNetworkAddress& na, EIpVersion requireVersion /*= EIP_VERSION_4*/, EIpVersion preferVersion /*= EIP_VERSION_ANY*/) {          TNetAddr addr(na, requireVersion, preferVersion); // throws @@ -396,7 +396,7 @@ namespace NBus {      int TBusLocator::Register(TBusService service, TBusKey start, TBusKey end, const TNetAddr& addr) {          TGuard<TMutex> G(Lock); - +           TServiceId serviceId = GetServiceId(service);          TItems::const_iterator it; @@ -416,12 +416,12 @@ namespace NBus {          Items.insert(itemToReg);          return 0;      } - +       int TBusLocator::Unregister(TBusService service, TBusKey start, TBusKey end) {          TGuard<TMutex> G(Lock);          TServiceId serviceId = GetServiceId(service);          Items.erase(TItem(serviceId, start, end, TNetAddr()));          return 0; -    } - +    }  +   } diff --git a/library/cpp/messagebus/oldmodule/module.cpp b/library/cpp/messagebus/oldmodule/module.cpp index 24bd778799f..406724127cf 100644 --- a/library/cpp/messagebus/oldmodule/module.cpp +++ b/library/cpp/messagebus/oldmodule/module.cpp @@ -402,7 +402,7 @@ namespace NBus {                  DoCallReplyHandler(call);                  Pending.erase(Pending.begin() + it);              } -        } +        }           return Pending.size() > 0;      } @@ -603,8 +603,8 @@ namespace NBus {              strReturn += call.GetStatus(flags);          }          return strReturn; -    } - +    }  +       TString TJobState::GetStatus(unsigned flags) {          Y_UNUSED(flags);          TString strReturn; @@ -616,7 +616,7 @@ namespace NBus {                               ToString(Status).data());          return strReturn;      } - +       //////////////////////////////////////////////////////////////////////      void TBusModuleImpl::CancelJob(TBusJob* job, EMessageStatus status) { @@ -857,7 +857,7 @@ void TModuleClientHandler::OnReply(TAutoPtr<TBusMessage> req, TAutoPtr<TBusMessa      Y_ASSERT(job->Job->Message != req.Get());      job->EnqueueAndSchedule(TJobResponseMessage(req.Release(), resp.Release(), MESSAGE_OK));      job->UnRef(); -} +}   void TModuleClientHandler::OnMessageSentOneWay(TAutoPtr<TBusMessage> req) {      TJobRunner* job = GetJob(req.Get()); diff --git a/library/cpp/messagebus/oldmodule/module.h b/library/cpp/messagebus/oldmodule/module.h index 8d1c4a5d52b..8625012e0fc 100644 --- a/library/cpp/messagebus/oldmodule/module.h +++ b/library/cpp/messagebus/oldmodule/module.h @@ -127,7 +127,7 @@ namespace NBus {              }              UseAddr = !!addr;          } - +       public:          TString GetStatus(unsigned flags);      }; @@ -270,7 +270,7 @@ namespace NBus {          /// return human reabable status of this job          virtual TString GetStatus(unsigned flags); - +           /// set sleep time for job          void Sleep(int milliSeconds); @@ -372,7 +372,7 @@ namespace NBus {          /// get status of all jobs in flight          TString GetStatus(unsigned flags = 0); - +           /// called when application is about to start          virtual bool StartInput();          /// called when application is about to exit diff --git a/library/cpp/messagebus/session.cpp b/library/cpp/messagebus/session.cpp index 46a7ece6a8f..98136adb61a 100644 --- a/library/cpp/messagebus/session.cpp +++ b/library/cpp/messagebus/session.cpp @@ -44,7 +44,7 @@ namespace NBus {          GetConnectSyscallsNumBulkForTest({addr}, MakeArrayRef(&r, 1));          return r;      } - +       // Split 'host' into name and port taking into account that host can be specified      // as ipv6 address ('[<ipv6 address]:port' notion).      bool SplitHost(const TString& host, TString* hostName, TString* portNum) { diff --git a/library/cpp/messagebus/test/helper/example.h b/library/cpp/messagebus/test/helper/example.h index 26b74753088..51ca899a216 100644 --- a/library/cpp/messagebus/test/helper/example.h +++ b/library/cpp/messagebus/test/helper/example.h @@ -80,7 +80,7 @@ namespace NBus {              void SendMessages(size_t count, const TNetAddr* addr = nullptr);              void SendMessages(size_t count, const TNetAddr& addr); - +               void ResetCounters();              void WaitReplies();              EMessageStatus WaitForError(); @@ -113,7 +113,7 @@ namespace NBus {                  const TBusServerSessionConfig& sessionConfig = TBusServerSessionConfig());              TExampleServer(unsigned port, const char* name = "TExampleServer"); - +               ~TExampleServer() override;          public: diff --git a/library/cpp/messagebus/test/perftest/perftest.cpp b/library/cpp/messagebus/test/perftest/perftest.cpp index 84893192789..8f89bec439c 100644 --- a/library/cpp/messagebus/test/perftest/perftest.cpp +++ b/library/cpp/messagebus/test/perftest/perftest.cpp @@ -514,7 +514,7 @@ TSimpleSharedPtr<TPerftestUsingModule> ServerUsingModule;  TVector<TSimpleSharedPtr<TPerftestClient>> Clients;  TMutex ClientsLock; -void stopsignal(int /*sig*/) { +void stopsignal(int /*sig*/) {       fprintf(stderr, "\n-------------------- exiting ------------------\n");      TheExit = true;      StopEvent.Signal(); diff --git a/library/cpp/messagebus/test/ut/one_way_ut.cpp b/library/cpp/messagebus/test/ut/one_way_ut.cpp index 9c21227e2bd..4106acf56b5 100644 --- a/library/cpp/messagebus/test/ut/one_way_ut.cpp +++ b/library/cpp/messagebus/test/ut/one_way_ut.cpp @@ -59,9 +59,9 @@ struct NullClient : TBusClientHandlerError {          /// register source/client session          Session = TBusClientSession::Create(&Proto, this, sessionConfig, Queue); - -        /// register service, announce to clients via LocatorService -        Session->RegisterService("localhost"); +  +        /// register service, announce to clients via LocatorService  +        Session->RegisterService("localhost");       }      ~NullClient() override {  | 
