#include "../../include/freenet/unkeyedidcreator.h"\r
#include "../../include/freenet/identityinserter.h"\r
#include "../../include/freenet/identityrequester.h"\r
+#include "../../include/freenet/unknownidentityrequester.h"\r
#include "../../include/freenet/introductionpuzzleinserter.h"\r
#include "../../include/freenet/identityintroductionrequester.h"\r
#include "../../include/freenet/introductionpuzzlerequester.h"\r
#include "../../include/freenet/trustlistinserter.h"\r
#include "../../include/freenet/trustlistrequester.h"\r
#include "../../include/freenet/messagelistrequester.h"\r
+#include "../../include/freenet/inactivemessagelistrequester.h"\r
#include "../../include/freenet/messagelistinserter.h"\r
#include "../../include/freenet/messagerequester.h"\r
#include "../../include/freenet/messageinserter.h"\r
\r
FreenetMasterThread::FreenetMasterThread()\r
{\r
- std::string fcpport;\r
\r
if(Option::Instance()->Get("FCPHost",m_fcphost)==false)\r
{\r
m_fcphost="localhost";\r
Option::Instance()->Set("FCPHost",m_fcphost);\r
}\r
- if(Option::Instance()->Get("FCPPort",fcpport)==false)\r
+ if(Option::Instance()->GetInt("FCPPort",m_fcpport)==false)\r
{\r
- fcpport="9481";\r
- Option::Instance()->Set("FCPPort",fcpport);\r
+ m_fcpport=9481;\r
+ Option::Instance()->Set("FCPPort",m_fcpport);\r
}\r
-\r
- // convert fcp port to long, and make sure it's within the valid port range\r
- if(StringFunctions::Convert(fcpport,m_fcpport)==false)\r
+ else\r
{\r
- m_fcpport=9481;\r
- Option::Instance()->Set("FCPPort","9481");\r
+ if(m_fcpport<1 || m_fcpport>65535)\r
+ {\r
+ m_fcpport=9481;\r
+ Option::Instance()->Set("FCPPort",m_fcpport);\r
+ }\r
}\r
\r
m_receivednodehello=false;\r
if(m_receivednodehello==true)\r
{\r
bool handled=false;\r
+\r
std::vector<IFCPMessageHandler *>::iterator i=m_fcpmessagehandlers.begin();\r
while(handled==false && i!=m_fcpmessagehandlers.end())\r
{\r
{\r
m_fcp.Update(1);\r
}\r
- if(m_fcp.Connected())\r
+ if(m_fcp.Connected() && length>0)\r
{\r
char *data=new char[length];\r
m_fcp.ReceiveRaw(data,length);\r
m_registrables.push_back(new UnkeyedIDCreator(&m_fcp));\r
m_registrables.push_back(new IdentityInserter(&m_fcp));\r
m_registrables.push_back(new IdentityRequester(&m_fcp));\r
+ m_registrables.push_back(new UnknownIdentityRequester(&m_fcp));\r
m_registrables.push_back(new IntroductionPuzzleInserter(&m_fcp));\r
m_registrables.push_back(new IdentityIntroductionRequester(&m_fcp));\r
m_registrables.push_back(new IntroductionPuzzleRequester(&m_fcp));\r
m_registrables.push_back(new TrustListRequester(&m_fcp));\r
m_registrables.push_back(new MessageListInserter(&m_fcp));\r
m_registrables.push_back(new MessageListRequester(&m_fcp));\r
+ m_registrables.push_back(new InactiveMessageListRequester(&m_fcp));\r
m_registrables.push_back(new MessageInserter(&m_fcp));\r
m_registrables.push_back(new MessageRequester(&m_fcp));\r
m_registrables.push_back(new BoardListInserter(&m_fcp));\r