2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Generate peer ID after SimpleRandomizer is initialized.
	* src/main.cc
	* src/option_processing.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-07-04 15:20:18 +00:00
parent 3f3e9c0ff0
commit f8fd518229
3 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Generate peer ID after SimpleRandomizer is initialized.
* src/main.cc
* src/option_processing.cc
2009-07-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2009-07-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed unused method argument. Removed unused method argument.

View File

@ -173,6 +173,10 @@ downloadresultcode::RESULT main(int argc, char* argv[])
SimpleRandomizer::init(); SimpleRandomizer::init();
BitfieldManFactory::setDefaultRandomizer(SimpleRandomizer::getInstance()); BitfieldManFactory::setDefaultRandomizer(SimpleRandomizer::getInstance());
#ifdef ENABLE_BITTORRENT
bittorrent::generateStaticPeerId(op->get(PREF_PEER_ID_PREFIX),
SimpleRandomizer::getInstance());
#endif // ENABLE_BITTORRENT
if(op->get(PREF_LOG) == "-") { if(op->get(PREF_LOG) == "-") {
LogFactory::setLogFile(DEV_STDOUT); LogFactory::setLogFile(DEV_STDOUT);
} else if(!op->get(PREF_LOG).empty()) { } else if(!op->get(PREF_LOG).empty()) {

View File

@ -204,10 +204,6 @@ void option_processing(Option& op, std::deque<std::string>& uris,
} }
} }
#endif // HAVE_DAEMON #endif // HAVE_DAEMON
#ifdef ENABLE_BITTORRENT
bittorrent::generateStaticPeerId(op.get(PREF_PEER_ID_PREFIX),
SimpleRandomizer::getInstance());
#endif // ENABLE_BITTORRENT
} }
} // namespace aria2 } // namespace aria2