Browse Source

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
Tatsuhiro Tsujikawa 15 years ago
parent
commit
f16a1d0e30
2 changed files with 7 additions and 3 deletions
  1. 5 0
      ChangeLog
  2. 2 3
      src/BtSetup.cc

+ 5 - 0
ChangeLog

@@ -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.

+ 2 - 3
src/BtSetup.cc

@@ -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;