- m_log->WriteLog(LogFile::LOGLEVEL_ERROR,"MessageRequester::HandleAllData MessageID in Message doesn't match public key of identity : "+message["Identifier"]);\r
+ m_log->error("MessageRequester::HandleAllData MessageID in Message doesn't match public key of identity : "+message["Identifier"]);\r
validmessage=false;\r
}\r
}\r
else\r
{\r
validmessage=false;\r
}\r
}\r
else\r
{\r
- m_log->WriteLog(LogFile::LOGLEVEL_ERROR,"MessageRequester::HandleAllData Error with identity's public key or Message ID : "+message["Identifier"]);\r
+ m_log->error("MessageRequester::HandleAllData Error with identity's public key or Message ID : "+message["Identifier"]);\r
- m_log->WriteLog(LogFile::LOGLEVEL_ERROR,"Option MaxMessageRequests is currently set at "+tempval+". It must be 1 or greater.");\r
+ m_log->error("Option MaxMessageRequests is currently set at "+tempval+". It must be 1 or greater.");\r
}\r
if(m_maxrequests>100)\r
{\r
}\r
if(m_maxrequests>100)\r
{\r
- m_log->WriteLog(LogFile::LOGLEVEL_WARNING,"Option MaxMessageRequests is currently set at "+tempval+". This value might be incorrectly configured.");\r
+ m_log->warning("Option MaxMessageRequests is currently set at "+tempval+". This value might be incorrectly configured.");\r
- m_log->WriteLog(LogFile::LOGLEVEL_ERROR,"Option MessageDownloadMaxDaysBackward is currently set at "+tempval+". It must be 0 or greater.");\r
+ m_log->error("Option MessageDownloadMaxDaysBackward is currently set at "+tempval+". It must be 0 or greater.");\r
}\r
if(m_maxdaysbackward>30)\r
{\r
}\r
if(m_maxdaysbackward>30)\r
{\r
- m_log->WriteLog(LogFile::LOGLEVEL_WARNING,"Option MessageDownloadMaxDaysBackward is currently set at "+tempval+". This value might be incorrectly configured.");\r
+ m_log->warning("Option MessageDownloadMaxDaysBackward is currently set at "+tempval+". This value might be incorrectly configured.");\r
- m_log->WriteLog(LogFile::LOGLEVEL_WARNING,"Option MaxPeerMessagesPerDay is currently set at "+tempval+". This value might be incorrectly configured. The suggested value is 200.");\r
+ m_log->warning("Option MaxPeerMessagesPerDay is currently set at "+tempval+". This value might be incorrectly configured. The suggested value is 200.");\r
- m_log->WriteLog(LogFile::LOGLEVEL_ERROR,"Option MaxBoardsPerMessage is currently set at "+tempval+". It must be 1 or greater.");\r
+ m_log->error("Option MaxBoardsPerMessage is currently set at "+tempval+". It must be 1 or greater.");\r
}\r
if(m_maxboardspermessage>20)\r
{\r
}\r
if(m_maxboardspermessage>20)\r
{\r
- m_log->WriteLog(LogFile::LOGLEVEL_WARNING,"Option MaxBoardsPerMessage is currently set at "+tempval+". This value might be incorrectly configured.");\r
+ m_log->warning("Option MaxBoardsPerMessage is currently set at "+tempval+". This value might be incorrectly configured.");\r
sql+="FROM tblMessageRequests INNER JOIN tblIdentity ON tblMessageRequests.IdentityID=tblIdentity.IdentityID ";\r
- sql+="WHERE FromMessageList='true' AND Found='false' AND Day>='"+date.Format("%Y-%m-%d")+"' ";\r
+ sql+="WHERE FromMessageList='true' AND Found='false' AND Day>='"+Poco::DateTimeFormatter::format(date,"%Y-%m-%d")+"' ";\r
if(m_localtrustoverrides==false)\r
{\r
sql+="AND (tblIdentity.LocalMessageTrust IS NULL OR tblIdentity.LocalMessageTrust>=(SELECT OptionValue FROM tblOption WHERE Option='MinLocalMessageTrust')) ";\r
if(m_localtrustoverrides==false)\r
{\r
sql+="AND (tblIdentity.LocalMessageTrust IS NULL OR tblIdentity.LocalMessageTrust>=(SELECT OptionValue FROM tblOption WHERE Option='MinLocalMessageTrust')) ";\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
}\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
+ // secondary ascending sort on tries\r
+ // tertiary sort on request index (so we get low indexes first)\r
+ sql+="ORDER BY tblMessageRequests.Day DESC, tblMessageRequests.Tries ASC, tblMessageRequests.RequestIndex ASC ";\r