aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorrdna <rdna@yandex-team.ru>2022-02-10 16:48:05 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:05 +0300
commit37a2795395ba606e239b750ff2afb17905274ec4 (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp
parent7804d69d166cc162c0be19dafd698a6ad7e42b25 (diff)
downloadydb-37a2795395ba606e239b750ff2afb17905274ec4.tar.gz
Restoring authorship annotation for <rdna@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/messagebus/acceptor.cpp6
-rw-r--r--library/cpp/messagebus/config/session_config.cpp24
-rw-r--r--library/cpp/messagebus/session_impl.cpp4
3 files changed, 17 insertions, 17 deletions
diff --git a/library/cpp/messagebus/acceptor.cpp b/library/cpp/messagebus/acceptor.cpp
index b8284aa580..64a38619c2 100644
--- a/library/cpp/messagebus/acceptor.cpp
+++ b/library/cpp/messagebus/acceptor.cpp
@@ -77,9 +77,9 @@ void TAcceptor::Act(TDefaultTag) {
SetSockOptTcpCork(s, Session->Config.TcpCork);
SetCloseOnExec(s, true);
SetNonBlock(s, true);
- if (Session->Config.SocketToS >= 0) {
- SetSocketToS(s, addr.Get(), Session->Config.SocketToS);
- }
+ if (Session->Config.SocketToS >= 0) {
+ SetSocketToS(s, addr.Get(), Session->Config.SocketToS);
+ }
} catch (...) {
// It means that connection was reset just now
// TODO: do something better
diff --git a/library/cpp/messagebus/config/session_config.cpp b/library/cpp/messagebus/config/session_config.cpp
index 0679945dcc..fbbbb106c9 100644
--- a/library/cpp/messagebus/config/session_config.cpp
+++ b/library/cpp/messagebus/config/session_config.cpp
@@ -1,7 +1,7 @@
#include "session_config.h"
-#include <util/generic/strbuf.h>
-#include <util/string/hex.h>
+#include <util/generic/strbuf.h>
+#include <util/string/hex.h>
using namespace NBus;
@@ -26,20 +26,20 @@ static int ParseDurationForMessageBus(const char* option) {
return TDuration::Parse(option).MilliSeconds();
}
-static int ParseToSForMessageBus(const char* option) {
- int tos;
- TStringBuf str(option);
+static int ParseToSForMessageBus(const char* option) {
+ int tos;
+ TStringBuf str(option);
if (str.StartsWith("0x")) {
- str = str.Tail(2);
+ str = str.Tail(2);
Y_VERIFY(str.length() == 2, "ToS must be a number between 0x00 and 0xFF");
tos = String2Byte(str.data());
- } else {
- tos = FromString<int>(option);
- }
+ } else {
+ tos = FromString<int>(option);
+ }
Y_VERIFY(tos >= 0 && tos <= 255, "ToS must be between 0x00 and 0xFF");
- return tos;
-}
-
+ return tos;
+}
+
template <class T>
static T ParseWithKmgSuffixT(const char* option) {
TStringBuf str(option);
diff --git a/library/cpp/messagebus/session_impl.cpp b/library/cpp/messagebus/session_impl.cpp
index 30598b509a..ddf9f360c4 100644
--- a/library/cpp/messagebus/session_impl.cpp
+++ b/library/cpp/messagebus/session_impl.cpp
@@ -497,9 +497,9 @@ void TBusSessionImpl::Listen(const TVector<TBindResult>& bindTo, TBusMessageQueu
} else {
Y_VERIFY(actualPort == br.Addr.GetPort(), "state check");
}
- if (Config.SocketToS >= 0) {
+ if (Config.SocketToS >= 0) {
SetSocketToS(*br.Socket, &(br.Addr), Config.SocketToS);
- }
+ }
TAcceptorPtr acceptor(new TAcceptor(this, ++LastAcceptorId, br.Socket->Release(), br.Addr));