X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=src%2Ffreenet%2Ftrustlistinserter.cpp;h=79745ee53e072f6969af538edf19e2363af263aa;hp=2d14f894519abdbddc7e21e9e5182c8b374f1506;hb=175f098e7e712b839db433b93fe8649a402c6784;hpb=1dee4e3cd008a27789bbce05b0eb47b0eb5d121a diff --git a/src/freenet/trustlistinserter.cpp b/src/freenet/trustlistinserter.cpp index 2d14f89..79745ee 100644 --- a/src/freenet/trustlistinserter.cpp +++ b/src/freenet/trustlistinserter.cpp @@ -136,13 +136,15 @@ void TrustListInserter::StartInsert(const long localidentityid, const std::strin int index; std::string indexstr; std::string localidentityidstr; + std::string messagetrustcomment=""; + std::string trustlisttrustcomment=""; now.SetToGMTime(); date.SetToGMTime(); // build the xml file - we only want to add identities that we recently saw, otherwise we could be inserting a ton of identities date.Add(0,0,0,-20); // identities seen in last 20 days - SQLite3DB::Statement st=m_db->Prepare("SELECT PublicKey, LocalMessageTrust, LocalTrustListTrust FROM tblIdentity WHERE PublicKey IS NOT NULL AND PublicKey<>'' AND LastSeen>=?;"); + SQLite3DB::Statement st=m_db->Prepare("SELECT PublicKey, LocalMessageTrust, LocalTrustListTrust, MessageTrustComment, TrustListTrustComment FROM tblIdentity WHERE PublicKey IS NOT NULL AND PublicKey<>'' AND LastSeen>=?;"); st.Bind(0,date.Format("%Y-%m-%d")); st.Step(); while(st.RowReturned()) @@ -164,7 +166,9 @@ void TrustListInserter::StartInsert(const long localidentityid, const std::strin { trustlisttrust=-1; } - xml.AddTrust(publickey,messagetrust,trustlisttrust); + st.ResultText(3,messagetrustcomment); + st.ResultText(4,trustlisttrustcomment); + xml.AddTrust(publickey,messagetrust,trustlisttrust,messagetrustcomment,trustlisttrustcomment); st.Step(); }