From ddefc0d3480762b90053eb186e1169b9b4971cae Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 30 Apr 2006 11:03:25 +0000 Subject: [PATCH] fixed a bug in the http redirection code --- include/libtorrent/http_tracker_connection.hpp | 6 +++--- src/http_tracker_connection.cpp | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/libtorrent/http_tracker_connection.hpp b/include/libtorrent/http_tracker_connection.hpp index ef2370f69..bc19fd010 100755 --- a/include/libtorrent/http_tracker_connection.hpp +++ b/include/libtorrent/http_tracker_connection.hpp @@ -121,8 +121,8 @@ namespace libtorrent , const http_settings& stn , std::string const& password = ""); - virtual tracker_request const& tracker_req() const - { return m_req; } +// virtual tracker_request const& tracker_req() const +// { return m_req; } private: @@ -165,7 +165,7 @@ namespace libtorrent std::string m_server_protocol; const http_settings& m_settings; - tracker_request m_req; +// tracker_request m_req; std::string m_password; int m_code; diff --git a/src/http_tracker_connection.cpp b/src/http_tracker_connection.cpp index 5b0801bdf..85b1771e2 100755 --- a/src/http_tracker_connection.cpp +++ b/src/http_tracker_connection.cpp @@ -684,7 +684,7 @@ namespace libtorrent close(); return; } - if (inflate_gzip(m_buffer, m_req, r.get(), + if (inflate_gzip(m_buffer, tracker_request(), r.get(), m_settings.tracker_maximum_response_length)) { close(); @@ -778,7 +778,7 @@ namespace libtorrent entry scrape_data = e["files"][ih]; int complete = scrape_data["complete"].integer(); int incomplete = scrape_data["incomplete"].integer(); - requester().tracker_response(m_req, peer_list, 0, complete + requester().tracker_response(tracker_request(), peer_list, 0, complete , incomplete); return; } @@ -825,16 +825,16 @@ namespace libtorrent try { incomplete = e["incomplete"].integer(); } catch(type_error&) {} - requester().tracker_response(m_req, peer_list, interval, complete + requester().tracker_response(tracker_request(), peer_list, interval, complete , incomplete); } catch(type_error& e) { - requester().tracker_request_error(m_req, m_code, e.what()); + requester().tracker_request_error(tracker_request(), m_code, e.what()); } catch(std::runtime_error& e) { - requester().tracker_request_error(m_req, m_code, e.what()); + requester().tracker_request_error(tracker_request(), m_code, e.what()); } }