version 0.1.12
[fms.git] / src / freenet / introductionpuzzlerequester.cpp
index 4f85e7a..03d4a41 100644 (file)
@@ -64,6 +64,9 @@ const bool IntroductionPuzzleRequester::HandleAllData(FCPMessage &message)
        // parse file into xml and update the database\r
        if(xml.ParseXML(std::string(data.begin(),data.end()))==true)\r
        {\r
+\r
+               // TODO - check if last part of UUID matches public key of identity who inserted it\r
+\r
                st=m_db->Prepare("INSERT INTO tblIntroductionPuzzleRequests(IdentityID,Day,RequestIndex,Found,UUID,Type,MimeType,PuzzleData) VALUES(?,?,?,?,?,?,?,?);");\r
                st.Bind(0,identityid);\r
                st.Bind(1,idparts[4]);\r
@@ -202,7 +205,7 @@ void IntroductionPuzzleRequester::PopulateIDList()
        now.SetToGMTime();\r
 \r
        // select identities that aren't single use and have been seen today ( order by trust DESC and limit to limitnum )\r
-       st=m_db->Prepare("SELECT IdentityID FROM tblIdentity WHERE PublicKey IS NOT NULL AND PublicKey <> '' AND SingleUse='false' AND LastSeen>='"+now.Format("%Y-%m-%d")+"' ORDER BY LocalMessageTrust LIMIT 0,"+limitnum+";");\r
+       st=m_db->Prepare("SELECT IdentityID FROM tblIdentity WHERE PublicKey IS NOT NULL AND PublicKey <> '' AND SingleUse='false' AND LastSeen>='"+now.Format("%Y-%m-%d")+"' ORDER BY LocalMessageTrust DESC LIMIT 0,"+limitnum+";");\r
        st.Step();\r
 \r
        m_ids.clear();\r