version 0.3.31
[fms.git] / src / freenet / identityrequester.cpp
index 18810d5..6744c5a 100644 (file)
@@ -188,7 +188,7 @@ void IdentityRequester::PopulateIDList()
        date.assign(date.year(),date.month(),date.day(),0,0,0);\r
 \r
        // select identities we want to query (haven't seen yet today) - sort by their trust level (descending) with secondary sort on how long ago we saw them (ascending)\r
-       SQLite3DB::Statement st=m_db->Prepare("SELECT IdentityID FROM tblIdentity WHERE PublicKey IS NOT NULL AND PublicKey <> '' AND LastSeen IS NOT NULL AND LastSeen<'"+Poco::DateTimeFormatter::format(date,"%Y-%m-%d %H:%M:%S")+"' ORDER BY LocalMessageTrust+LocalTrustListTrust DESC, LastSeen;");\r
+       SQLite3DB::Statement st=m_db->Prepare("SELECT IdentityID FROM tblIdentity WHERE PublicKey IS NOT NULL AND PublicKey <> '' AND LastSeen IS NOT NULL AND LastSeen<'"+Poco::DateTimeFormatter::format(date,"%Y-%m-%d %H:%M:%S")+"' AND tblIdentity.FailureCount<=(SELECT OptionValue FROM tblOption WHERE Option='MaxFailureCount') ORDER BY LocalMessageTrust+LocalTrustListTrust DESC, LastSeen;");\r
        st.Step();\r
 \r
        m_ids.clear();\r