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)
{
path = GetDefaultDataDir();
}
if (fNetSpecific && GetBoolArg("-testnet", false))
- path /= "testnet";
+ path /= "testnet2";
fs::create_directory(path);
return pathPidFile;
}
+#ifndef WIN32
void CreatePidFile(const boost::filesystem::path &path, pid_t pid)
{
FILE* file = fopen(path.string().c_str(), "w");
fclose(file);
}
}
+#endif
bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest)
{
static int64 nTimeOffset = 0;
+int64 GetTimeOffset()
+{
+ return nTimeOffset;
+}
+
int64 GetAdjustedTime()
{
- return GetTime() + nTimeOffset;
+ return GetTime() + GetTimeOffset();
}
void AddTimeData(const CNetAddr& ip, int64 nTime)