version 0.0.2
[fms.git] / src / freenet / freenetmasterthread.cpp
index 01f03a0..e0db51c 100644 (file)
@@ -1,5 +1,6 @@
 #include "../../include/freenet/freenetmasterthread.h"\r
 #include "../../include/option.h"\r
+#include "../../include/uuidgenerator.h"\r
 #include "../../include/stringfunctions.h"\r
 #include "../../include/freenet/unkeyedidcreator.h"\r
 #include "../../include/freenet/identityinserter.h"\r
@@ -9,6 +10,7 @@
 #include "../../include/freenet/introductionpuzzlerequester.h"\r
 #include "../../include/freenet/introductionpuzzleremover.h"\r
 #include "../../include/freenet/identityintroductioninserter.h"\r
+#include "../../include/freenet/trustlistinserter.h"\r
 \r
 #include <zthread/Thread.h>\r
 \r
@@ -63,8 +65,10 @@ const bool FreenetMasterThread::FCPConnect()
 \r
        if(m_fcp.Connect(m_fcphost.c_str(),m_fcpport)==true)\r
        {\r
+               UUIDGenerator uuid;\r
+               std::string clientname="FMSClient-"+uuid.Generate();\r
                // send ClientHello message to node\r
-               m_fcp.SendMessage("ClientHello",2,"Name","FMSClient","ExpectedVersion","2.0");\r
+               m_fcp.SendMessage("ClientHello",2,"Name",clientname.c_str(),"ExpectedVersion","2.0");\r
 \r
                m_log->WriteLog(LogFile::LOGLEVEL_INFO,__FUNCTION__" connected to node");\r
 \r
@@ -228,6 +232,7 @@ void FreenetMasterThread::Setup()
        m_registrables.push_back(new IntroductionPuzzleRequester(&m_fcp));\r
        m_registrables.push_back(new IntroductionPuzzleRemover());\r
        m_registrables.push_back(new IdentityIntroductionInserter(&m_fcp));\r
+       m_registrables.push_back(new TrustListInserter(&m_fcp));\r
 \r
        for(std::vector<IFreenetRegistrable *>::iterator i=m_registrables.begin(); i!=m_registrables.end(); i++)\r
        {\r