From 402046338c57e86a14052a136b15a1bc90c85753 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 18 Feb 2004 00:08:20 +0000 Subject: [PATCH] *** empty log message *** --- Jamfile | 12 +++++++++--- examples/client_test.cpp | 7 +++++-- include/libtorrent/session.hpp | 3 +++ src/peer_connection.cpp | 1 + src/session.cpp | 1 + 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Jamfile b/Jamfile index b23030d2a..6ff70a1c0 100755 --- a/Jamfile +++ b/Jamfile @@ -1,3 +1,5 @@ +#This Jamfile requires boost-build v2 to build. + import modules ; BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ; @@ -18,9 +20,9 @@ project torrent /boost/filesystem : usage-requirements - /boost/thread - /boost/date_time - /boost/filesystem +# /boost/thread +# /boost/date_time +# /boost/filesystem ./include $(BOOST_ROOT) @@ -38,6 +40,7 @@ project torrent SOURCES = + allocate_resources.cpp alert.cpp entry.cpp identify_client.cpp @@ -70,6 +73,9 @@ SOURCES = lib torrent : +# /boost/thread +# /boost/filesystem +# /boost/date_time zlib//zlib src/$(SOURCES) : ./include diff --git a/examples/client_test.cpp b/examples/client_test.cpp index 365377358..222f9ba50 100755 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -42,6 +42,7 @@ POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include #ifdef _MSC_VER @@ -225,6 +226,8 @@ int main(int argc, char* argv[]) return 1; } + boost::filesystem::path::default_name_check(boost::filesystem::native); + http_settings settings; // settings.proxy_ip = "192.168.0.1"; // settings.proxy_port = 80; @@ -264,8 +267,8 @@ int main(int argc, char* argv[]) resume_data = bdecode(std::istream_iterator(resume_file) , std::istream_iterator()); } - catch (invalid_encoding&) - {} + catch (invalid_encoding&) {} + catch (boost::filesystem::filesystem_error&) {} handles.push_back(ses.add_torrent(t, save_path, resume_data)); handles.back().set_max_connections(60); diff --git a/include/libtorrent/session.hpp b/include/libtorrent/session.hpp index 3a9efebf2..e94781078 100755 --- a/include/libtorrent/session.hpp +++ b/include/libtorrent/session.hpp @@ -249,6 +249,9 @@ namespace libtorrent , const boost::filesystem::path& save_path , 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 set_http_settings(const http_settings& s); diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 5e2a1be60..7bbd2e0a6 100755 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -419,6 +419,7 @@ namespace libtorrent // clear the request queue if the client isn't interested m_requests.clear(); + send_buffer_updated(); #ifndef NDEBUG (*m_logger) << " <== NOT_INTERESTED\n"; diff --git a/src/session.cpp b/src/session.cpp index 172cee6f3..9d20492ea 100755 --- a/src/session.cpp +++ b/src/session.cpp @@ -431,6 +431,7 @@ namespace libtorrent } catch(const std::exception& e) { + // TODO: generate an alert here! #ifndef NDEBUG std::cerr << "error while checking files: " << e.what() << "\n"; #endif