This macro causes a lot of problems for Qt.
int ReadHTTPHeader(std::basic_istream<char>& stream, map<string, string>& mapHeadersRet)
{
int nLen = 0;
- loop
+ while (true)
{
string str;
std::getline(stream, str);
AcceptedConnection *conn = (AcceptedConnection *) parg;
bool fRun = true;
- loop {
+ while (true)
+ {
if (fShutdown || !fRun)
{
conn->close();
// Load mapBlockIndex
unsigned int fFlags = DB_SET_RANGE;
- loop
+ while (true)
{
// Read next record
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
bool RecvLineIRC(SOCKET hSocket, string& strLine)
{
- loop
+ while (true)
{
bool fRet = RecvLine(hSocket, strLine);
if (fRet)
int RecvUntil(SOCKET hSocket, const char* psz1, const char* psz2=NULL, const char* psz3=NULL, const char* psz4=NULL)
{
- loop
+ while (true)
{
string strLine;
strLine.reserve(10000);
bool RecvCodeLine(SOCKET hSocket, const char* psz1, string& strRet)
{
strRet.clear();
- loop
+ while (true)
{
string strLine;
if (!RecvLineIRC(hSocket, strLine))
FILE* AppendBlockFile(unsigned int& nFileRet)
{
nFileRet = 0;
- loop
+ while (true)
{
FILE* file = OpenBlockFile(nCurrentBlockFile, 0, "ab");
if (!file)
// (x) data
//
- loop
+ while (true)
{
// Don't bother if send buffer is too full to respond anyway
if (pfrom->vSend.size() >= SendBufferSize())
bool RecvLine(SOCKET hSocket, string& strLine)
{
strLine = "";
- loop
+ while (true)
{
char c;
int nBytes = recv(hSocket, &c, 1, 0);
{
if (strLine.empty()) // HTTP response is separated from headers by blank line
{
- loop
+ while (true)
{
if (!RecvLine(hSocket, strLine))
{
list<CNode*> vNodesDisconnected;
unsigned int nPrevNodeCount = 0;
- loop
+ while (true)
{
//
// Disconnect nodes
else
printf("UPnP Port Mapping successful.\n");
int i = 1;
- loop {
+ while (true)
+ {
if (fShutdown || !fUseUPnP)
{
r = UPNP_DeletePortMapping(urls.controlURL, data.first.servicetype, port.c_str(), "TCP", 0);
freeUPNPDevlist(devlist); devlist = 0;
if (r != 0)
FreeUPNPUrls(&urls);
- loop {
+ while (true)
+ {
if (fShutdown || !fUseUPnP)
return;
Sleep(2000);
// Initiate network connections
int64 nStart = GetTime();
- loop
+ while (true)
{
ProcessOneShot();
int64 nANow = GetAdjustedTime();
int nTries = 0;
- loop
+ while (true)
{
// use an nUnkBias between 10 (no outgoing connections) and 90 (8 outgoing connections)
CAddress addr = addrman.Select(10 + min(nOutbound,8)*10);
}
}
}
- loop
+ while (true)
{
vector<vector<CService> > vservConnectAddresses = vservAddressesToAdd;
// Attempt to connect to each IP for each addnode entry until at least one is successful per addnode entry
size_t nSize = 0;
unsigned int nPriority = 0;
- loop
+ while (true)
{
ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(100);
if (mq->timed_receive(&buffer, sizeof(buffer), nSize, nPriority, d))
// Compare
CScript::const_iterator pc1 = script1.begin();
CScript::const_iterator pc2 = script2.begin();
- loop
+ while (true)
{
if (pc1 == script1.end() && pc2 == script2.end())
{
char* p = buffer;
int limit = sizeof(buffer);
int ret;
- loop
+ while (true)
{
va_list arg_ptr;
va_copy(arg_ptr, ap);
return;
string::size_type i1 = 0;
string::size_type i2;
- loop
+ while (true)
{
i2 = str.find(c, i1);
if (i2 == str.npos)
{
// convert hex dump to vector
vector<unsigned char> vch;
- loop
+ while (true)
{
while (isspace(*psz))
psz++;
bool WildcardMatch(const char* psz, const char* mask)
{
- loop
+ while (true)
{
switch (*mask)
{
static const int64 COIN = 1000000;
static const int64 CENT = 10000;
-#define loop for (;;)
#define BEGIN(a) ((char*)&(a))
#define END(a) ((char*)&((&(a))[1]))
#define UBEGIN(a) ((unsigned char*)&(a))
CTxDB txdb("r");
{
nFeeRet = nTransactionFee;
- loop
+ while (true)
{
wtxNew.vin.clear();
wtxNew.vout.clear();
}
int64 nMinFee = 0;
- loop
+ while (true)
{
// Set output amount
if (txNew.vout.size() == 3)
if (!pcursor)
throw runtime_error("CWalletDB::ListAccountCreditDebit() : cannot create DB cursor");
unsigned int fFlags = DB_SET_RANGE;
- loop
+ while (true)
{
// Read next record
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
return DB_CORRUPT;
}
- loop
+ while (true)
{
// Read next record
CDataStream ssKey(SER_DISK, CLIENT_VERSION);