Merge pull request #6703
45bfa13PARTIAL: typofixes (found by misspell_fixer) (Veres Lajos)21c406eadd support for miniupnpc api version 14 (Pavel Vasin)13bd5a7rpc-tests: re-enable rpc-tests for Windows (Cory Fields)ccc4ad6net: Set SO_REUSEADDR for Windows too (Cory Fields)1f6772eadd unit test for CNetAddr::GetGroup. (Alex Morcos)13642a5Fix masking of irrelevant bits in address groups. (Alex Morcos)6b51b9bReplace boost::reverse_lock with our own. (Casey Rodarmor)626c5e6Make sure we re-acquire lock if a task throws (Casey Rodarmor)4877053Add missing files to files.md (fanquake)f171feeHandle leveldb::DestroyDB() errors on wipe failure (Adam Weiss)c5b89feFix race condition on test node shutdown (Casey Rodarmor)4a37410Handle no chain tip available in InvalidChainFound() (Ross Nicoll)f6d29a6Use unique name for AlertNotify tempfile (Casey Rodarmor)e6adac7Delay initial pruning until after wallet init (Adam Weiss)e0020d4Make sure LogPrint strings are line-terminated (J Ross Nicoll)7ff9d12Make sure LogPrintf strings are line-terminated (Wladimir J. van der Laan)5a39133build: fix libressl detection (Cory Fields)f6355e6Avoid leaking file descriptors in RegisterLoad (Casey Rodarmor)60457d3locking: fix a few small issues uncovered by -Wthread-safety (Cory Fields)a496e11Remove bash test note from rpc-tests readme (fanquake)49c6a64tests: Remove old sh-based test framework (Wladimir J. van der Laan)a37567dAdd autogen.sh to source tarball. (randy-waterhouse)1f4d7cftravis: for travis generating an extra build (Cory Fields)
This commit is contained in:
16
src/net.cpp
16
src/net.cpp
@@ -554,7 +554,7 @@ bool CNode::ReceiveMsgBytes(const char *pch, unsigned int nBytes)
|
||||
return false;
|
||||
|
||||
if (msg.in_data && msg.hdr.nMessageSize > MAX_PROTOCOL_MESSAGE_LENGTH) {
|
||||
LogPrint("net", "Oversized message from peer=%i, disconnecting", GetId());
|
||||
LogPrint("net", "Oversized message from peer=%i, disconnecting\n", GetId());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1007,10 +1007,14 @@ void ThreadMapPort()
|
||||
#ifndef UPNPDISCOVER_SUCCESS
|
||||
/* miniupnpc 1.5 */
|
||||
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
|
||||
#else
|
||||
#elif MINIUPNPC_API_VERSION < 14
|
||||
/* miniupnpc 1.6 */
|
||||
int error = 0;
|
||||
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
|
||||
#else
|
||||
/* miniupnpc 1.9.20150730 */
|
||||
int error = 0;
|
||||
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);
|
||||
#endif
|
||||
|
||||
struct UPNPUrls urls;
|
||||
@@ -1502,8 +1506,10 @@ bool BindListenPort(const CService &addrBind, string& strError, bool fWhiteliste
|
||||
setsockopt(hListenSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&nOne, sizeof(int));
|
||||
#endif
|
||||
// Allow binding if the port is still in TIME_WAIT state after
|
||||
// the program was closed and restarted. Not an issue on windows!
|
||||
// the program was closed and restarted.
|
||||
setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEADDR, (void*)&nOne, sizeof(int));
|
||||
#else
|
||||
setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEADDR, (const char*)&nOne, sizeof(int));
|
||||
#endif
|
||||
|
||||
// Set to non-blocking, incoming connections will also inherit this
|
||||
@@ -2052,8 +2058,10 @@ void CNode::EndMessage() UNLOCK_FUNCTION(cs_vSend)
|
||||
Fuzz(GetArg("-fuzzmessagestest", 10));
|
||||
|
||||
if (ssSend.size() == 0)
|
||||
{
|
||||
LEAVE_CRITICAL_SECTION(cs_vSend);
|
||||
return;
|
||||
|
||||
}
|
||||
// Set the size
|
||||
unsigned int nSize = ssSend.size() - CMessageHeader::HEADER_SIZE;
|
||||
WriteLE32((uint8_t*)&ssSend[CMessageHeader::MESSAGE_SIZE_OFFSET], nSize);
|
||||
|
||||
Reference in New Issue
Block a user