forked from premiere/premiere-libtorrent
*** empty log message ***
This commit is contained in:
parent
c69a184216
commit
bc77a39f30
|
@ -86,39 +86,40 @@
|
|||
<li><a class="reference" href="#listen-failed-alert" id="id75" name="id75">listen_failed_alert</a></li>
|
||||
<li><a class="reference" href="#file-error-alert" id="id76" name="id76">file_error_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-alert" id="id77" name="id77">tracker_alert</a></li>
|
||||
<li><a class="reference" href="#hash-failed-alert" id="id78" name="id78">hash_failed_alert</a></li>
|
||||
<li><a class="reference" href="#peer-ban-alert" id="id79" name="id79">peer_ban_alert</a></li>
|
||||
<li><a class="reference" href="#peer-error-alert" id="id80" name="id80">peer_error_alert</a></li>
|
||||
<li><a class="reference" href="#invalid-request-alert" id="id81" name="id81">invalid_request_alert</a></li>
|
||||
<li><a class="reference" href="#torrent-finished-alert" id="id82" name="id82">torrent_finished_alert</a></li>
|
||||
<li><a class="reference" href="#metadata-received-alert" id="id83" name="id83">metadata_received_alert</a></li>
|
||||
<li><a class="reference" href="#dispatcher" id="id84" name="id84">dispatcher</a></li>
|
||||
<li><a class="reference" href="#tracker-reply-alert" id="id78" name="id78">tracker_reply_alert</a></li>
|
||||
<li><a class="reference" href="#hash-failed-alert" id="id79" name="id79">hash_failed_alert</a></li>
|
||||
<li><a class="reference" href="#peer-ban-alert" id="id80" name="id80">peer_ban_alert</a></li>
|
||||
<li><a class="reference" href="#peer-error-alert" id="id81" name="id81">peer_error_alert</a></li>
|
||||
<li><a class="reference" href="#invalid-request-alert" id="id82" name="id82">invalid_request_alert</a></li>
|
||||
<li><a class="reference" href="#torrent-finished-alert" id="id83" name="id83">torrent_finished_alert</a></li>
|
||||
<li><a class="reference" href="#metadata-received-alert" id="id84" name="id84">metadata_received_alert</a></li>
|
||||
<li><a class="reference" href="#dispatcher" id="id85" name="id85">dispatcher</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#exceptions" id="id85" name="id85">exceptions</a><ul>
|
||||
<li><a class="reference" href="#invalid-handle" id="id86" name="id86">invalid_handle</a></li>
|
||||
<li><a class="reference" href="#duplicate-torrent" id="id87" name="id87">duplicate_torrent</a></li>
|
||||
<li><a class="reference" href="#invalid-encoding" id="id88" name="id88">invalid_encoding</a></li>
|
||||
<li><a class="reference" href="#type-error" id="id89" name="id89">type_error</a></li>
|
||||
<li><a class="reference" href="#invalid-torrent-file" id="id90" name="id90">invalid_torrent_file</a></li>
|
||||
<li><a class="reference" href="#exceptions" id="id86" name="id86">exceptions</a><ul>
|
||||
<li><a class="reference" href="#invalid-handle" id="id87" name="id87">invalid_handle</a></li>
|
||||
<li><a class="reference" href="#duplicate-torrent" id="id88" name="id88">duplicate_torrent</a></li>
|
||||
<li><a class="reference" href="#invalid-encoding" id="id89" name="id89">invalid_encoding</a></li>
|
||||
<li><a class="reference" href="#type-error" id="id90" name="id90">type_error</a></li>
|
||||
<li><a class="reference" href="#invalid-torrent-file" id="id91" name="id91">invalid_torrent_file</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#examples" id="id91" name="id91">examples</a><ul>
|
||||
<li><a class="reference" href="#dump-torrent" id="id92" name="id92">dump_torrent</a></li>
|
||||
<li><a class="reference" href="#simple-client" id="id93" name="id93">simple client</a></li>
|
||||
<li><a class="reference" href="#examples" id="id92" name="id92">examples</a><ul>
|
||||
<li><a class="reference" href="#dump-torrent" id="id93" name="id93">dump_torrent</a></li>
|
||||
<li><a class="reference" href="#simple-client" id="id94" name="id94">simple client</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#fast-resume" id="id94" name="id94">fast resume</a><ul>
|
||||
<li><a class="reference" href="#file-format" id="id95" name="id95">file format</a></li>
|
||||
<li><a class="reference" href="#fast-resume" id="id95" name="id95">fast resume</a><ul>
|
||||
<li><a class="reference" href="#file-format" id="id96" name="id96">file format</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#extensions" id="id96" name="id96">extensions</a><ul>
|
||||
<li><a class="reference" href="#chat-messages" id="id97" name="id97">chat messages</a></li>
|
||||
<li><a class="reference" href="#metadata-from-peers" id="id98" name="id98">metadata from peers</a></li>
|
||||
<li><a class="reference" href="#extensions" id="id97" name="id97">extensions</a><ul>
|
||||
<li><a class="reference" href="#chat-messages" id="id98" name="id98">chat messages</a></li>
|
||||
<li><a class="reference" href="#metadata-from-peers" id="id99" name="id99">metadata from peers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#filename-checks" id="id99" name="id99">filename checks</a></li>
|
||||
<li><a class="reference" href="#acknowledgements" id="id100" name="id100">acknowledgements</a></li>
|
||||
<li><a class="reference" href="#filename-checks" id="id100" name="id100">filename checks</a></li>
|
||||
<li><a class="reference" href="#acknowledgements" id="id101" name="id101">acknowledgements</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="introduction">
|
||||
|
@ -1771,6 +1772,21 @@ struct tracker_alert: alert
|
|||
};
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="tracker-reply-alert">
|
||||
<h2><a name="tracker-reply-alert">tracker_reply_alert</a></h2>
|
||||
<p>This alert is only for informational purpose. It is generated when a tracker announce
|
||||
succeeds. It is generated with severity level <tt class="docutils literal"><span class="pre">info</span></tt>.</p>
|
||||
<pre class="literal-block">
|
||||
struct tracker_reply_alert: alert
|
||||
{
|
||||
tracker_reply_alert(const torrent_handle& h
|
||||
, const std::string& msg);
|
||||
|
||||
virtual std::auto_ptr<alert> clone() const;
|
||||
torrent_handle handle;
|
||||
};
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="hash-failed-alert">
|
||||
<h2><a name="hash-failed-alert">hash_failed_alert</a></h2>
|
||||
<p>This alert is generated when a finished piece fails its hash check. You can get the handle
|
||||
|
|
|
@ -1783,6 +1783,23 @@ The ``times_in_row`` member says how many times in a row this tracker has failed
|
|||
};
|
||||
|
||||
|
||||
tracker_reply_alert
|
||||
-------------------
|
||||
|
||||
This alert is only for informational purpose. It is generated when a tracker announce
|
||||
succeeds. It is generated with severity level ``info``.
|
||||
|
||||
::
|
||||
|
||||
struct tracker_reply_alert: alert
|
||||
{
|
||||
tracker_reply_alert(const torrent_handle& h
|
||||
, const std::string& msg);
|
||||
|
||||
virtual std::auto_ptr<alert> clone() const;
|
||||
torrent_handle handle;
|
||||
};
|
||||
|
||||
|
||||
hash_failed_alert
|
||||
-----------------
|
||||
|
|
|
@ -57,6 +57,20 @@ namespace libtorrent
|
|||
int times_in_row;
|
||||
};
|
||||
|
||||
struct tracker_reply_alert: alert
|
||||
{
|
||||
tracker_reply_alert(const torrent_handle& h
|
||||
, const std::string& msg)
|
||||
: alert(alert::info, msg)
|
||||
, handle(h)
|
||||
{}
|
||||
|
||||
virtual std::auto_ptr<alert> clone() const
|
||||
{ return std::auto_ptr<alert>(new tracker_reply_alert(*this)); }
|
||||
|
||||
torrent_handle handle;
|
||||
};
|
||||
|
||||
struct hash_failed_alert: alert
|
||||
{
|
||||
hash_failed_alert(
|
||||
|
|
|
@ -343,6 +343,14 @@ namespace libtorrent
|
|||
m_policy->peer_from_tracker(a, i->id);
|
||||
}
|
||||
|
||||
if (m_ses.m_alerts.should_post(alert::info))
|
||||
{
|
||||
std::stringstream s;
|
||||
s << "Got response from tracker: "
|
||||
<< m_trackers[m_last_working_tracker].url;
|
||||
m_ses.m_alerts.post_alert(tracker_reply_alert(
|
||||
get_handle(), s.str()));
|
||||
}
|
||||
m_got_tracker_response = true;
|
||||
}
|
||||
|
||||
|
@ -1053,7 +1061,7 @@ namespace libtorrent
|
|||
|
||||
if (m_last_working_tracker >= 0)
|
||||
{
|
||||
st.current_tracker
|
||||
st.current_tracker
|
||||
= m_trackers[m_last_working_tracker].url;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue