forked from premiere/premiere-libtorrent
*** empty log message ***
This commit is contained in:
parent
71e1fd4407
commit
402046338c
12
Jamfile
12
Jamfile
|
@ -1,3 +1,5 @@
|
||||||
|
#This Jamfile requires boost-build v2 to build.
|
||||||
|
|
||||||
import modules ;
|
import modules ;
|
||||||
|
|
||||||
BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
|
BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
|
||||||
|
@ -18,9 +20,9 @@ project torrent
|
||||||
<library>/boost/filesystem
|
<library>/boost/filesystem
|
||||||
|
|
||||||
: usage-requirements
|
: usage-requirements
|
||||||
<use>/boost/thread
|
# <use>/boost/thread
|
||||||
<use>/boost/date_time
|
# <use>/boost/date_time
|
||||||
<use>/boost/filesystem
|
# <use>/boost/filesystem
|
||||||
|
|
||||||
<include>./include
|
<include>./include
|
||||||
<include>$(BOOST_ROOT)
|
<include>$(BOOST_ROOT)
|
||||||
|
@ -38,6 +40,7 @@ project torrent
|
||||||
|
|
||||||
|
|
||||||
SOURCES =
|
SOURCES =
|
||||||
|
allocate_resources.cpp
|
||||||
alert.cpp
|
alert.cpp
|
||||||
entry.cpp
|
entry.cpp
|
||||||
identify_client.cpp
|
identify_client.cpp
|
||||||
|
@ -70,6 +73,9 @@ SOURCES =
|
||||||
|
|
||||||
lib torrent
|
lib torrent
|
||||||
:
|
:
|
||||||
|
# /boost/thread
|
||||||
|
# /boost/filesystem
|
||||||
|
# /boost/date_time
|
||||||
zlib//zlib
|
zlib//zlib
|
||||||
src/$(SOURCES)
|
src/$(SOURCES)
|
||||||
: <include>./include
|
: <include>./include
|
||||||
|
|
|
@ -42,6 +42,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <boost/format.hpp>
|
#include <boost/format.hpp>
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
#include <boost/filesystem/fstream.hpp>
|
#include <boost/filesystem/fstream.hpp>
|
||||||
|
#include <boost/filesystem/exception.hpp>
|
||||||
#include <boost/bind.hpp>
|
#include <boost/bind.hpp>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
@ -225,6 +226,8 @@ int main(int argc, char* argv[])
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boost::filesystem::path::default_name_check(boost::filesystem::native);
|
||||||
|
|
||||||
http_settings settings;
|
http_settings settings;
|
||||||
// settings.proxy_ip = "192.168.0.1";
|
// settings.proxy_ip = "192.168.0.1";
|
||||||
// settings.proxy_port = 80;
|
// settings.proxy_port = 80;
|
||||||
|
@ -264,8 +267,8 @@ int main(int argc, char* argv[])
|
||||||
resume_data = bdecode(std::istream_iterator<char>(resume_file)
|
resume_data = bdecode(std::istream_iterator<char>(resume_file)
|
||||||
, std::istream_iterator<char>());
|
, std::istream_iterator<char>());
|
||||||
}
|
}
|
||||||
catch (invalid_encoding&)
|
catch (invalid_encoding&) {}
|
||||||
{}
|
catch (boost::filesystem::filesystem_error&) {}
|
||||||
|
|
||||||
handles.push_back(ses.add_torrent(t, save_path, resume_data));
|
handles.push_back(ses.add_torrent(t, save_path, resume_data));
|
||||||
handles.back().set_max_connections(60);
|
handles.back().set_max_connections(60);
|
||||||
|
|
|
@ -249,6 +249,9 @@ namespace libtorrent
|
||||||
, const boost::filesystem::path& save_path
|
, const boost::filesystem::path& save_path
|
||||||
, const entry& resume_data = entry());
|
, const entry& resume_data = entry());
|
||||||
|
|
||||||
|
// TODO: add the ability to change listen-port on the fly
|
||||||
|
// TODO: make it possible to ask for the current listen port
|
||||||
|
|
||||||
void remove_torrent(const torrent_handle& h);
|
void remove_torrent(const torrent_handle& h);
|
||||||
|
|
||||||
void set_http_settings(const http_settings& s);
|
void set_http_settings(const http_settings& s);
|
||||||
|
|
|
@ -419,6 +419,7 @@ namespace libtorrent
|
||||||
|
|
||||||
// clear the request queue if the client isn't interested
|
// clear the request queue if the client isn't interested
|
||||||
m_requests.clear();
|
m_requests.clear();
|
||||||
|
send_buffer_updated();
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
(*m_logger) << " <== NOT_INTERESTED\n";
|
(*m_logger) << " <== NOT_INTERESTED\n";
|
||||||
|
|
|
@ -431,6 +431,7 @@ namespace libtorrent
|
||||||
}
|
}
|
||||||
catch(const std::exception& e)
|
catch(const std::exception& e)
|
||||||
{
|
{
|
||||||
|
// TODO: generate an alert here!
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
std::cerr << "error while checking files: " << e.what() << "\n";
|
std::cerr << "error while checking files: " << e.what() << "\n";
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue