limit total length of user agent comments

Reworked-By: Wladimir J. van der Laan <laanwj@gmail.com>
This commit is contained in:
Pavol Rusnak
2015-07-31 18:05:42 +02:00
committed by Jack Grigg
parent 8c5e229ac9
commit 2bc62dc4e3
5 changed files with 16 additions and 4 deletions

View File

@@ -73,6 +73,7 @@ static std::vector<ListenSocket> vhListenSocket;
CAddrMan addrman;
int nMaxConnections = DEFAULT_MAX_PEER_CONNECTIONS;
bool fAddressesInitialized = false;
std::string strSubVersion;
vector<CNode*> vNodes;
CCriticalSection cs_vNodes;
@@ -435,7 +436,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<string>()), nBestHeight, true);
nLocalHostNonce, strSubVersion, nBestHeight, true);
}