*** empty log message ***

This commit is contained in:
Arvid Norberg 2005-07-06 13:18:10 +00:00
parent e003bb8ad5
commit d26b6462b5
8 changed files with 34 additions and 30 deletions

View File

@ -191,6 +191,7 @@ means it can resume a torrent downloaded by any client.</li>
<li>supports the <tt class="docutils literal"><span class="pre">compact=1</span></tt> tracker parameter.</li>
<li>selective downloading. The ability to select which parts of a torrent you
want to download.</li>
<li>ip filter</li>
</ul>
</blockquote>
<p>libtorrent is portable at least among Windows, MacOSX and other UNIX-systems. It uses Boost.Thread,
@ -813,7 +814,7 @@ void add_file(boost::filesystem::path file, size_type size);
the comment that belongs to this torrent. The comment can be retrieved with the
<tt class="docutils literal"><span class="pre">comment()</span></tt> member.</p>
<p><tt class="docutils literal"><span class="pre">set_piece_size()</span></tt> will set the size of each piece in this torrent. The piece size must
be an even multiple of 2. i.e. usually something like 256 kB, 512 kB, 1024 kB etc. The
be an even multiple of 2. i.e. usually something like 256 kiB, 512 kiB, 1024 kiB etc. The
size is given in number of bytes.</p>
<p><tt class="docutils literal"><span class="pre">set_creator()</span></tt> is an optional attribute that can be used to identify your application
that was used to create the torrent file.</p>
@ -2420,7 +2421,8 @@ int main(int argc, char* argv[])
if (argc != 4)
{
std::cerr &lt;&lt; &quot;usage: make_torrent &lt;output torrent-file&gt; &lt;announce url&gt; &lt;file or directory to create torrent from&gt;\n&quot;;
std::cerr &lt;&lt; &quot;usage: make_torrent &lt;output torrent-file&gt; &lt;announce url&gt; &quot;
&quot;&lt;file or directory to create torrent from&gt;\n&quot;;
return 1;
}

View File

@ -52,6 +52,7 @@ The current state includes the following features:
* supports the ``compact=1`` tracker parameter.
* selective downloading. The ability to select which parts of a torrent you
want to download.
* ip filter
__ http://home.elp.rr.com/tur/multitracker-spec.txt
.. _Azureus: http://azureus.sourceforge.net
@ -714,7 +715,7 @@ the comment that belongs to this torrent. The comment can be retrieved with the
``comment()`` member.
``set_piece_size()`` will set the size of each piece in this torrent. The piece size must
be an even multiple of 2. i.e. usually something like 256 kB, 512 kB, 1024 kB etc. The
be an even multiple of 2. i.e. usually something like 256 kiB, 512 kiB, 1024 kiB etc. The
size is given in number of bytes.
``set_creator()`` is an optional attribute that can be used to identify your application
@ -2482,7 +2483,8 @@ Shows how to create a torrent from a directory tree::
if (argc != 4)
{
std::cerr << "usage: make_torrent <output torrent-file> <announce url> <file or directory to create torrent from>\n";
std::cerr << "usage: make_torrent <output torrent-file> <announce url> "
"<file or directory to create torrent from>\n";
return 1;
}

View File

@ -64,7 +64,7 @@ POSSIBILITY OF SUCH DAMAGE.
namespace libtorrent
{
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
struct logger;
#endif
@ -345,7 +345,7 @@ namespace libtorrent
torrent_handle get_handle() const;
// LOGGING
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
logger* spawn_logger(const char* title);
virtual void debug_log(const std::string& line);

View File

@ -125,7 +125,7 @@ namespace libtorrent
address m_tracker_address;
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
virtual void debug_log(const std::string& line) = 0;
#endif
private:

View File

@ -215,7 +215,7 @@ namespace libtorrent
m_send_buffer += base64encode(auth);
}
m_send_buffer += "\r\n\r\n";
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (has_requester())
{
requester().debug_log("==> TRACKER_REQUEST [ str: " + m_send_buffer + " ]");
@ -231,7 +231,7 @@ namespace libtorrent
// the connections list.
bool http_tracker_connection::tick()
{
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
try
{
#endif
@ -246,7 +246,7 @@ namespace libtorrent
return true;
}
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (has_requester()) requester().debug_log("tracker connection tick");
#endif
@ -287,7 +287,7 @@ namespace libtorrent
if (!m_socket->is_readable()) return false;
m_request_time = second_clock::universal_time();
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (has_requester()) requester().debug_log("tracker connection socket readable");
#endif
@ -316,7 +316,7 @@ namespace libtorrent
if (received > 0) m_recv_pos += received;
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (has_requester()) requester().debug_log("received: " + boost::lexical_cast<std::string>(m_recv_pos));
#endif
@ -337,7 +337,7 @@ namespace libtorrent
// if we don't have a full line yet, wait.
if (newline == end) return false;
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (has_requester()) requester().debug_log(std::string(m_buffer.begin(), newline));
#endif
@ -379,7 +379,7 @@ namespace libtorrent
{
line.assign(m_buffer.begin(), newline);
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (has_requester()) requester().debug_log(line);
#endif
@ -447,7 +447,7 @@ namespace libtorrent
else if (line.size() < 3)
{
m_state = read_body;
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (has_requester()) requester().debug_log("end of http header");
#endif
if (m_code >= 300 && m_code < 400)
@ -463,7 +463,7 @@ namespace libtorrent
return true;
}
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (has_requester()) requester().debug_log("Redirecting to \"" + m_location + "\"");
#endif
std::string::size_type i = m_location.find('?');
@ -529,7 +529,7 @@ namespace libtorrent
}
return false;
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
}
catch (std::exception&)
{

View File

@ -813,7 +813,7 @@ namespace libtorrent
throw protocol_error("too many connections, refusing incoming connection"); // cause a disconnect
}
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (c.get_socket()->sender().ip() == m_torrent->current_tracker().ip())
{
m_torrent->debug_log("overriding connection limit for tracker NAT-check");

View File

@ -321,7 +321,7 @@ namespace libtorrent
// connect to random peers from the list
std::random_shuffle(peer_list.begin(), peer_list.end());
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
std::stringstream s;
s << "TRACKER RESPONSE:\n"
"interval: " << m_duration << "\n"
@ -348,7 +348,7 @@ namespace libtorrent
if (m_ses.m_ip_filter.access(a) == ip_filter::blocked)
{
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
debug_log("blocked ip from tracker: " + i->ip);
#endif
continue;
@ -1465,7 +1465,7 @@ namespace libtorrent
void torrent::tracker_request_timed_out(
tracker_request const&)
{
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
debug_log("*** tracker timed out");
#endif
if (m_ses.m_alerts.should_post(alert::warning))
@ -1486,7 +1486,7 @@ namespace libtorrent
void torrent::tracker_request_error(tracker_request const&
, int response_code, const std::string& str)
{
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
debug_log(std::string("*** tracker error: ") + str);
#endif
if (m_ses.m_alerts.should_post(alert::warning))
@ -1504,7 +1504,7 @@ namespace libtorrent
}
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
void torrent::debug_log(const std::string& line)
{
(*m_ses.m_logger) << line << "\n";

View File

@ -256,7 +256,7 @@ namespace libtorrent
if (len < 8)
{
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (has_requester())
requester().debug_log("udp_tracker_connection: "
"got a message with size < 8, ignoring");
@ -282,7 +282,7 @@ namespace libtorrent
if (len < 20)
{
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (has_requester())
requester().debug_log("udp_tracker_connection: "
"got a message with size < 20, ignoring");
@ -330,7 +330,7 @@ namespace libtorrent
if (len < 8)
{
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (has_requester())
requester().debug_log("udp_tracker_connection: "
"got a message with size < 8, ignoring");
@ -356,7 +356,7 @@ namespace libtorrent
if (len < 20)
{
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (has_requester())
requester().debug_log("udp_tracker_connection: "
"got a message with size < 20, ignoring");
@ -383,7 +383,7 @@ namespace libtorrent
if (len < 8)
{
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (has_requester())
requester().debug_log("udp_tracker_connection: "
"got a message with size < 8, ignoring");
@ -404,7 +404,7 @@ namespace libtorrent
if (action != connect) return false;
if (m_transaction_id != transaction)
{
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (has_requester())
requester().debug_log("udp_tracker_connection: "
"got a message with incorrect transaction id, ignoring");
@ -414,7 +414,7 @@ namespace libtorrent
if (len < 16)
{
#ifdef TORRENT_VERBOSE_LOGGING
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
if (has_requester())
requester().debug_log("udp_tracker_connection: "
"got a connection message size < 16, ignoring");