\r
// receive the file\r
data.resize(datalength);\r
- m_fcp->ReceiveRaw(&data[0],datalength);\r
+ if(data.size()>0)\r
+ {\r
+ m_fcp->ReceiveRaw(&data[0],datalength);\r
+ }\r
\r
// parse file into xml and update the database\r
- if(xml.ParseXML(std::string(data.begin(),data.end()))==true)\r
+ if(data.size()>0 && xml.ParseXML(std::string(data.begin(),data.end()))==true)\r
{\r
\r
st=m_db->Prepare("UPDATE tblIdentity SET Name=?, SingleUse=?, LastSeen=?, PublishTrustList=?, PublishBoardList=?, FreesiteEdition=? WHERE IdentityID=?");\r
\r
void IdentityRequester::Initialize()\r
{\r
- std::string tempval="";\r
m_fcpuniquename="IdentityRequester";\r
- Option::Instance()->Get("MaxIdentityRequests",tempval);\r
- StringFunctions::Convert(tempval,m_maxrequests);\r
+ Option::Instance()->GetInt("MaxIdentityRequests",m_maxrequests);\r
if(m_maxrequests<1)\r
{\r
m_maxrequests=1;\r
- m_log->error("Option MaxIdentityRequests is currently set at "+tempval+". It must be 1 or greater.");\r
+ m_log->error("Option MaxIdentityRequests is currently set at less than 1. It must be 1 or greater.");\r
}\r
if(m_maxrequests>100)\r
{\r
- m_log->warning("Option MaxIdentityRequests is currently set at "+tempval+". This value might be incorrectly configured.");\r
+ m_log->warning("Option MaxIdentityRequests is currently set at more than 100. This value might be incorrectly configured.");\r
}\r
}\r
\r