diff --git a/ChangeLog b/ChangeLog index 17a40f3d..d7a74790 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-12 Tatsuhiro Tsujikawa + + Use global option for PREF_LISTEN_PORT and PREF_BT_LPD_INTERFACE. + * src/BtSetup.cc + 2010-03-12 Tatsuhiro Tsujikawa Resurrected --http-proxy-user and --http-proxy-passwd option. diff --git a/src/BtSetup.cc b/src/BtSetup.cc index 60be57d7..4585faeb 100644 --- a/src/BtSetup.cc +++ b/src/BtSetup.cc @@ -159,7 +159,7 @@ void BtSetup::setup(std::vector& commands, } if(PeerListenCommand::getNumInstance() == 0) { PeerListenCommand* listenCommand = PeerListenCommand::getInstance(e); - IntSequence seq = util::parseIntRange(option->get(PREF_LISTEN_PORT)); + IntSequence seq = util::parseIntRange(e->option->get(PREF_LISTEN_PORT)); uint16_t port; if(listenCommand->bindPort(port, seq)) { btRuntime->setListenPort(port); @@ -175,13 +175,12 @@ void BtSetup::setup(std::vector& commands, } if(option->getAsBool(PREF_BT_ENABLE_LPD) && (metadataGetMode || torrentAttrs[bittorrent::PRIVATE].i() == 0)) { - if(LpdReceiveMessageCommand::getNumInstance() == 0) { _logger->info("Initializing LpdMessageReceiver."); SharedHandle receiver (new LpdMessageReceiver(LPD_MULTICAST_ADDR, LPD_MULTICAST_PORT)); bool initialized = false; - const std::string& lpdInterface = option->get(PREF_BT_LPD_INTERFACE); + const std::string& lpdInterface = e->option->get(PREF_BT_LPD_INTERFACE); if(lpdInterface.empty()) { if(receiver->init("")) { initialized = true;