\r
_session = new libtorrent::session(libtorrent::fingerprint("HT", MAJOR, MINOR, REVISION, TAG));\r
\r
+ libtorrent::session_settings ss;\r
+\r
if(Settings->GetI("upnp") > 0)\r
_session->start_upnp();\r
\r
_session->listen_on(std::make_pair(Settings->GetI("minport"), Settings->GetI("maxport")));\r
+ if (Settings->GetI("limitlocal") > 0) {\r
+ ss.ignore_limits_on_local_network = false;\r
+ }\r
if(Settings->GetI("maxup") > 0) {\r
_session->set_upload_rate_limit(Settings->GetI("maxup")*1024);\r
- _session->set_local_upload_rate_limit(Settings->GetI("maxup")*1024);\r
}\r
- if(Settings->GetI("maxdown") > 0){\r
+ if(Settings->GetI("maxdown") > 0) {\r
_session->set_download_rate_limit(Settings->GetI("maxdown")*1024);\r
- _session->set_local_download_rate_limit(Settings->GetI("maxdown")*1024);\r
}\r
try {\r
libtorrent::add_torrent_params parms;\r
\r
boost::intrusive_ptr<libtorrent::torrent_info> info = new libtorrent::torrent_info(_argv[_argc-1]);\r
- boost::filesystem::path p(Settings->GetS("downloaddir"));\r
+ boost::filesystem::path p(Settings->GetS("outputdir"));\r
boost::filesystem::create_directory(p);\r
if(!boost::filesystem::exists(p)) {\r
std::cerr << "Download directory does not exist/could not be created." << std::endl;\r
_session->set_ip_filter(IPFilter->getFilter());\r
}\r
\r
+ /* add settings */\r
+ _session->set_settings(ss);\r
+\r
ScheduleSignal(SIGINT);\r
std::cout << "\"CTRL-C\" shuts hrktorrent down.\n" << std::endl;\r
\r
std::cout << "[" << source << "] ";\r
std::cout << message << std::endl;\r
}\r
-\r