Initial merge
This commit is contained in:
@@ -233,10 +233,7 @@ bool LookupNumeric(const char *pszName, CService& addr, int portDefault)
|
||||
return Lookup(pszName, addr, portDefault, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert milliseconds to a struct timeval for select.
|
||||
*/
|
||||
struct timeval static MillisToTimeval(int64_t nTimeout)
|
||||
struct timeval MillisToTimeval(int64_t nTimeout)
|
||||
{
|
||||
struct timeval timeout;
|
||||
timeout.tv_sec = nTimeout / 1000;
|
||||
@@ -1346,6 +1343,11 @@ bool operator!=(const CSubNet& a, const CSubNet& b)
|
||||
return !(a==b);
|
||||
}
|
||||
|
||||
bool operator<(const CSubNet& a, const CSubNet& b)
|
||||
{
|
||||
return (a.network < b.network || (a.network == b.network && memcmp(a.netmask, b.netmask, 16) < 0));
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
std::string NetworkErrorString(int err)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user