From 7b79cbd722d35b8113d5136b06d4a8e5fd569fc6 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Fri, 31 Jul 2015 18:05:42 +0200 Subject: limit total length of user agent comments Reworked-By: Wladimir J. van der Laan --- src/net.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/net.cpp') diff --git a/src/net.cpp b/src/net.cpp index 42ca69e09..080d9bb34 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -83,6 +83,7 @@ CAddrMan addrman; int nMaxConnections = 125; int nWhiteConnections = 0; bool fAddressesInitialized = false; +std::string strSubVersion; vector vNodes; CCriticalSection cs_vNodes; @@ -445,7 +446,7 @@ void CNode::PushVersion() else LogPrint("net", "send version message: version %d, blocks=%d, us=%s, peer=%d\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), id); PushMessage("version", PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe, - nLocalHostNonce, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, mapMultiArgs.count("-uacomment") ? mapMultiArgs["-uacomment"] : std::vector()), nBestHeight, true); + nLocalHostNonce, strSubVersion, nBestHeight, true); } -- cgit v1.2.3