print even less in test_web_seed
This commit is contained in:
parent
ad2f4d1697
commit
cb3371dd7f
|
@ -74,7 +74,7 @@ void report_failure(char const* err, char const* file, int line)
|
||||||
|
|
||||||
bool print_alerts(libtorrent::session& ses, char const* name
|
bool print_alerts(libtorrent::session& ses, char const* name
|
||||||
, bool allow_disconnects, bool allow_no_torrents, bool allow_failed_fastresume
|
, bool allow_disconnects, bool allow_no_torrents, bool allow_failed_fastresume
|
||||||
, bool (*predicate)(libtorrent::alert*))
|
, bool (*predicate)(libtorrent::alert*), bool no_output)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
std::vector<torrent_handle> handles = ses.get_torrents();
|
std::vector<torrent_handle> handles = ses.get_torrents();
|
||||||
|
@ -92,10 +92,12 @@ bool print_alerts(libtorrent::session& ses, char const* name
|
||||||
}
|
}
|
||||||
else if ((*i)->message() != "block downloading"
|
else if ((*i)->message() != "block downloading"
|
||||||
&& (*i)->message() != "block finished"
|
&& (*i)->message() != "block finished"
|
||||||
&& (*i)->message() != "piece finished")
|
&& (*i)->message() != "piece finished"
|
||||||
|
&& !no_output)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: %s\n", name, (*i)->message().c_str());
|
fprintf(stderr, "%s: %s\n", name, (*i)->message().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CHECK(alert_cast<fastresume_rejected_alert>(*i) == 0 || allow_failed_fastresume);
|
TEST_CHECK(alert_cast<fastresume_rejected_alert>(*i) == 0 || allow_failed_fastresume);
|
||||||
|
|
||||||
peer_error_alert* pea = alert_cast<peer_error_alert>(*i);
|
peer_error_alert* pea = alert_cast<peer_error_alert>(*i);
|
||||||
|
@ -130,7 +132,7 @@ void wait_for_listen(libtorrent::session& ses, char const* name)
|
||||||
alert const* a = 0;
|
alert const* a = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
print_alerts(ses, name, true, true, true, &listen_alert);
|
print_alerts(ses, name, true, true, true, &listen_alert, false);
|
||||||
if (listen_done) break;
|
if (listen_done) break;
|
||||||
a = ses.wait_for_alert(milliseconds(500));
|
a = ses.wait_for_alert(milliseconds(500));
|
||||||
} while (a);
|
} while (a);
|
||||||
|
|
|
@ -46,7 +46,8 @@ bool print_alerts(libtorrent::session& ses, char const* name
|
||||||
, bool allow_disconnects = false
|
, bool allow_disconnects = false
|
||||||
, bool allow_no_torrents = false
|
, bool allow_no_torrents = false
|
||||||
, bool allow_failed_fastresume = false
|
, bool allow_failed_fastresume = false
|
||||||
, bool (*)(libtorrent::alert*) = 0);
|
, bool (*)(libtorrent::alert*) = 0
|
||||||
|
, bool no_output = false);
|
||||||
|
|
||||||
void wait_for_listen(libtorrent::session& ses, char const* name);
|
void wait_for_listen(libtorrent::session& ses, char const* name);
|
||||||
void test_sleep(int millisec);
|
void test_sleep(int millisec);
|
||||||
|
|
|
@ -118,7 +118,7 @@ void test_transfer(boost::intrusive_ptr<torrent_info> torrent_file
|
||||||
<< " buffers: " << cs.total_used_buffers
|
<< " buffers: " << cs.total_used_buffers
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
*/
|
*/
|
||||||
print_alerts(ses, " >> ses");
|
print_alerts(ses, " >> ses", false, false, false, 0, true);
|
||||||
|
|
||||||
if (s.is_seeding /* && ss.download_rate == 0.f*/)
|
if (s.is_seeding /* && ss.download_rate == 0.f*/)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue