+ if(data.size()>0)\r
+ {\r
+ m_fcp->ReceiveRaw(&data[0],datalength);\r
+ }\r
+\r
+ // get count of identities added in last 24 hours\r
+ st=m_db->Prepare("SELECT COUNT(*) FROM tblIdentity WHERE DateAdded>=?;");\r
+ now-=Poco::Timespan(1,0,0,0,0);\r
+ st.Bind(0,Poco::DateTimeFormatter::format(now,"%Y-%m-%d %H:%M:%S"));\r
+ st.Step();\r
+ if(st.RowReturned())\r
+ {\r
+ if(st.ResultNull(0)==false)\r
+ {\r
+ st.ResultInt(0,dayinsertcount);\r
+ }\r
+ }\r
+ else\r
+ {\r
+ m_log->error("TrustListRequester::HandleAllData couldn't get count of identities added in last 24 hours");\r
+ }\r
+\r
+ // get count of identities added more than 24 hours ago - if 0 then we will accept more than 100 identities now\r
+ st=m_db->Prepare("SELECT COUNT(*) FROM tblIdentity WHERE DateAdded<?;");\r
+ st.Bind(0,Poco::DateTimeFormatter::format(now,"%Y-%m-%d %H:%M:%S"));\r
+ st.Step();\r
+ if(st.RowReturned())\r
+ {\r
+ if(st.ResultNull(0)==false)\r
+ {\r
+ st.ResultInt(0,previnsertcount);\r
+ }\r
+ }\r
+ else\r
+ {\r
+ m_log->error("TrustListRequester::HandleAllData couldn't get count of identities added more than 24 hours ago");\r
+ }\r
+\r
+ now=Poco::DateTime();\r