#include <xmem.h>\r
#endif\r
\r
-bool wantshutdown=false;\r
+volatile bool wantshutdown=false;\r
\r
std::string CreateShortIdentityName(const std::string &name, const std::string &publickey)\r
{\r
{\r
\r
DateTime date;\r
+ std::string tempval="";\r
SQLite3DB::DB *db=SQLite3DB::DB::Instance();\r
\r
db->Open("fms.db3");\r
db->SetBusyTimeout(10000); // set timeout to 10 seconds\r
- //db->Execute("VACUUM;"); // not needed every startup\r
+\r
+ tempval="";\r
+ Option::Instance()->Get("VacuumOnStartup",tempval);\r
+ if(tempval=="true")\r
+ {\r
+ db->Execute("VACUUM;");\r
+ }\r
\r
db->Execute("CREATE TABLE IF NOT EXISTS tblDBVersion(\\r
Major INTEGER,\\r
);");\r
\r
db->Execute("INSERT INTO tblBoard(BoardName,BoardDescription,DateAdded,AddedMethod) VALUES('fms','Freenet Message System','2007-12-01 12:00:00','Initial Board');");\r
- db->Execute("INSERT INTO tblBoard(BoardName,BoardDescription,DateAdded,AddedMethod) VALUES('freenet','Discussion about Freenet','2007-12-01 12:00:00','Initialt Board');");\r
+ db->Execute("INSERT INTO tblBoard(BoardName,BoardDescription,DateAdded,AddedMethod) VALUES('freenet','Discussion about Freenet','2007-12-01 12:00:00','Initial Board');");\r
db->Execute("INSERT INTO tblBoard(BoardName,BoardDescription,DateAdded,AddedMethod) VALUES('public','Public discussion','2007-12-01 12:00:00','Initial Board');");\r
db->Execute("INSERT INTO tblBoard(BoardName,BoardDescription,DateAdded,AddedMethod) VALUES('test','Test board','2007-12-01 12:00:00','Initial Board');");\r
\r
st.Step();\r
st.Reset();\r
\r
+ st.Bind(0,"LocalTrustOverridesPeerTrust");\r
+ st.Bind(1,"false");\r
+ st.Bind(2,"Set to true if you want your local trust levels to override the peer levels when determining which identities you will poll.");\r
+ st.Step();\r
+ st.Reset();\r
+\r
st.Bind(0,"MessageDownloadMaxDaysBackward");\r
st.Bind(1,"5");\r
st.Bind(2,"The maximum number of days backward that messages will be downloaded from each identity");\r
st.Step();\r
st.Reset();\r
\r
+ st.Bind(0,"VacuumOnStartup");\r
+ st.Bind(1,"false");\r
+ st.Bind(2,"VACUUM the database every time FMS starts. This will defragment the free space in the database and create a smaller database file. Vacuuming the database can be CPU and disk intensive.");\r
+ st.Step();\r
+ st.Reset();\r
+\r
}\r
\r
void SetupLogFile()\r
\r
void Shutdown()\r
{\r
+\r
+ LogFile::Instance()->WriteLog(LogFile::LOGLEVEL_DEBUG,"FMS starting shutdown");\r
+\r
ThreadController::Instance()->ShutdownThreads();\r
\r
ShutdownNetwork();\r