2010-03-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Use global option for PREF_LISTEN_PORT and PREF_BT_LPD_INTERFACE.
	* src/BtSetup.cc
pull/1/head
Tatsuhiro Tsujikawa 2010-03-11 15:15:06 +00:00
parent ca2b33c3da
commit f16a1d0e30
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2010-03-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use global option for PREF_LISTEN_PORT and PREF_BT_LPD_INTERFACE.
* src/BtSetup.cc
2010-03-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Resurrected --http-proxy-user and --http-proxy-passwd option.

View File

@ -159,7 +159,7 @@ void BtSetup::setup(std::vector<Command*>& 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<Command*>& commands,
}
if(option->getAsBool(PREF_BT_ENABLE_LPD) &&
(metadataGetMode || torrentAttrs[bittorrent::PRIVATE].i() == 0)) {
if(LpdReceiveMessageCommand::getNumInstance() == 0) {
_logger->info("Initializing LpdMessageReceiver.");
SharedHandle<LpdMessageReceiver> 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;