X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffreenet%2Fmessagerequester.cpp;h=5c95cdbbcdb9da3eb2e1123f14bf15e8a4dd4aa5;hb=853f67b0b7b8121d572cff34d40f7b28cac8f65e;hp=70a5dba79f1c1ce0dc7d93a541a057109f0066f0;hpb=9a14c0d9f7f7c319e539583b93664953764e83b7;p=fms.git diff --git a/src/freenet/messagerequester.cpp b/src/freenet/messagerequester.cpp index 70a5dba..5c95cdb 100644 --- a/src/freenet/messagerequester.cpp +++ b/src/freenet/messagerequester.cpp @@ -415,6 +415,8 @@ void MessageRequester::PopulateIDList() 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')))) "; } sql+="AND tblIdentity.Name <> '' "; + // 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 + sql+="ORDER BY tblMessageRequests.Day DESC "; sql+=";"; SQLite3DB::Statement st=m_db->Prepare(sql); @@ -494,7 +496,7 @@ void MessageRequester::StartRequest(const std::string &requestid) message["Identifier"]=m_fcpuniquename+"|"+requestid+"|"+parts[0]+"|"+parts[1]+"|"+parts[2]+"|"+message["URI"]; message["ReturnType"]="direct"; message["MaxSize"]="1000000"; // 1 MB - message["MaxRetries"]="-1"; // use new ULPR since we are fairly sure message exists since the author says it does + message["MaxRetries"]="-1"; // use ULPR since we are fairly sure message exists since the author says it does m_fcp->SendMessage(message);