mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
Adding volatile keyword
This commit is contained in:
parent
5706ad6e5c
commit
acf59f0b7e
2
Queue.h
2
Queue.h
@ -118,7 +118,7 @@ namespace util
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
std::thread m_Thread;
|
std::thread m_Thread;
|
||||||
int running;
|
volatile int running;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
8
i2p.cpp
8
i2p.cpp
@ -26,8 +26,8 @@
|
|||||||
|
|
||||||
|
|
||||||
// Global
|
// Global
|
||||||
int running = 1;
|
volatile int running = 1;
|
||||||
int isDaemon;
|
volatile int isDaemon;
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
void handle_signal(int sig)
|
void handle_signal(int sig)
|
||||||
@ -60,7 +60,7 @@ void handle_signal(int sig)
|
|||||||
int main( int argc, char* argv[] )
|
int main( int argc, char* argv[] )
|
||||||
{
|
{
|
||||||
i2p::util::config::OptionParser(argc,argv);
|
i2p::util::config::OptionParser(argc,argv);
|
||||||
isDaemon = i2p::util::config::GetArg("-daemon", 0);
|
volatile int isDaemon = i2p::util::config::GetArg("-daemon", 0);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
setlocale(LC_CTYPE, "");
|
setlocale(LC_CTYPE, "");
|
||||||
SetConsoleCP(1251);
|
SetConsoleCP(1251);
|
||||||
@ -73,7 +73,7 @@ int main( int argc, char* argv[] )
|
|||||||
LogPrint("data directory: ", i2p::util::filesystem::GetDataDir().string());
|
LogPrint("data directory: ", i2p::util::filesystem::GetDataDir().string());
|
||||||
i2p::util::filesystem::ReadConfigFile(i2p::util::config::mapArgs, i2p::util::config::mapMultiArgs);
|
i2p::util::filesystem::ReadConfigFile(i2p::util::config::mapArgs, i2p::util::config::mapMultiArgs);
|
||||||
|
|
||||||
int isLogging = i2p::util::config::GetArg("-log", 0);
|
volatile int isLogging = i2p::util::config::GetArg("-log", 0);
|
||||||
if (isLogging == 1)
|
if (isLogging == 1)
|
||||||
{
|
{
|
||||||
std::string logfile = i2p::util::filesystem::GetDataDir().string();
|
std::string logfile = i2p::util::filesystem::GetDataDir().string();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user