*** empty log message ***

This commit is contained in:
Arvid Norberg 2004-01-07 02:45:03 +00:00
parent 91c9156de1
commit 70ce7c23ba
1 changed files with 10 additions and 4 deletions

View File

@ -204,10 +204,16 @@ int main(int argc, char* argv[])
torrent_info t(e); torrent_info t(e);
t.print(std::cout); t.print(std::cout);
entry resume_data;
try
{
std::ifstream resume_file("test.fastresume", std::ios_base::binary); std::ifstream resume_file("test.fastresume", std::ios_base::binary);
resume_file.unsetf(std::ios_base::skipws); resume_file.unsetf(std::ios_base::skipws);
entry resume_data = bdecode(std::istream_iterator<char>(resume_file) resume_data = bdecode(std::istream_iterator<char>(resume_file)
, std::istream_iterator<char>()); , std::istream_iterator<char>());
}
catch (invalid_encoding&)
{}
handles.push_back(ses.add_torrent(t, "", resume_data)); handles.push_back(ses.add_torrent(t, "", resume_data));
handles.back().set_max_uploads(40); handles.back().set_max_uploads(40);