+CMAKE_MINIMUM_REQUIRED(VERSION 2.4)\r
+IF(COMMAND CMAKE_POLICY)\r
+ CMAKE_POLICY(SET CMP0003 OLD)\r
+ENDIF(COMMAND CMAKE_POLICY)\r
+\r
PROJECT(fms)\r
\r
OPTION(USE_BUNDLED_SQLITE "Use the bundled SQLite3 library." OFF)\r
#include <vector>\r
#include "pthreadwrapper/thread.h"\r
\r
-#define FMS_VERSION "0.2.19"\r
+#define FMS_VERSION "0.2.20"\r
\r
// opens database and creates tables and initial inserts if necessary\r
void SetupDB();\r
// reset the last inserted xml doc to nothing so we will try to insert this one again\r
m_lastinsertedxml[localidentityid]="";\r
}\r
+ else\r
+ {\r
+ m_log->WriteLog(LogFile::LOGLEVEL_DEBUG,"MessageListInserter::HandlePutFailed "+message["Identifier"]);\r
+ }\r
\r
return true;\r
\r
\r
m_log->WriteLog(LogFile::LOGLEVEL_DEBUG,"MessageListInserter::HandlePutSuccessful successfully inserted MessageList.");\r
}\r
+ else\r
+ {\r
+ m_log->WriteLog(LogFile::LOGLEVEL_DEBUG,"MessageListInserter::HandlePutSuccessful inserted USK MessageList "+message["Identifier"]);\r
+ }\r
\r
return true;\r
}\r
st.Step();\r
st.Finalize();\r
\r
- m_log->WriteLog(LogFile::LOGLEVEL_ERROR,"MessageListRequester::HandleGetFailed fatal error requesting "+message["Identifier"]);\r
+ m_log->WriteLog(LogFile::LOGLEVEL_ERROR,"MessageListRequester::HandleGetFailed fatal error code="+message["Code"]+" requesting "+message["Identifier"]);\r
}\r
\r
// remove this identityid from request list\r
{\r
st2.ResultInt(0,index);\r
// don't increment index here - the node will let us know if there is a new edition\r
- //index++;\r
+ // 2008-05-31 - well actually the node isn't reliably retreiving the latest edition for USKs, so we DO need to increment the index\r
+ index++;\r
}\r
}\r
st2.Finalize();\r
sql+="AND (tblIdentity.LocalMessageTrust>=(SELECT OptionValue FROM tblOption WHERE Option='MinLocalMessageTrust') OR (tblIdentity.LocalMessageTrust IS NULL AND (tblIdentity.PeerMessageTrust IS NULL OR tblIdentity.PeerMessageTrust>=(SELECT OptionValue FROM tblOption WHERE Option='MinPeerMessageTrust')))) ";\r
}\r
sql+="AND tblIdentity.Name <> '' ";\r
+ // sort by day descending - in case there is a bunch of messages on a day that keep timing out, we will eventually get to the next day and hopefully find messages there\r
+ sql+="ORDER BY tblMessageRequests.Day DESC ";\r
sql+=";";\r
\r
SQLite3DB::Statement st=m_db->Prepare(sql);\r
{\r
DateTime date;\r
date.SetToGMTime();\r
+ date.SetHour(0);\r
+ date.SetMinute(0);\r
+ date.SetSecond(0);\r
+ date.Normalize();\r
\r
SQLite3DB::Statement st=m_db->Prepare("SELECT LocalIdentityID FROM tblLocalIdentity WHERE PublishFreesite='true' AND (LastInsertedFreesite IS NULL OR LastInsertedFreesite<?);");\r
st.Bind(0,date.Format("%Y-%m-%d"));\r
st.Step();\r
}\r
\r
- std::string output=StringFunctions::Replace(htmltemplate,"[CONTENT]",content);\r
- return StringFunctions::Replace(output,"[IDENTITYNAME]",SanitizeOutput(name));\r
+ return StringFunctions::Replace(htmltemplate,"[CONTENT]",content);\r
\r
}\r
\r
htmltemplate.append(data.begin(),data.end());\r
\r
htmltemplate=StringFunctions::Replace(htmltemplate,"[LINKS]",GenerateLinks(publishtrustlist,publishboardlist));\r
+ htmltemplate=StringFunctions::Replace(htmltemplate,"[IDENTITYNAME]",SanitizeOutput(name));\r
\r
pages["index.htm"]=GenerateIndex(htmltemplate,localidentityid,name);\r
if(publishtrustlist)\r