made client test not use a deprecated function. fixes #229

This commit is contained in:
Arvid Norberg 2007-12-15 23:35:25 +00:00
parent 00d5625b7e
commit 7a393426b1
1 changed files with 3 additions and 3 deletions

View File

@ -425,15 +425,15 @@ void add_torrent(libtorrent::session& ses
std::ifstream in(torrent.c_str(), std::ios_base::binary); std::ifstream in(torrent.c_str(), std::ios_base::binary);
in.unsetf(std::ios_base::skipws); in.unsetf(std::ios_base::skipws);
entry e = bdecode(std::istream_iterator<char>(in), std::istream_iterator<char>()); entry e = bdecode(std::istream_iterator<char>(in), std::istream_iterator<char>());
torrent_info t(e); boost::intrusive_ptr<torrent_info> t(new torrent_info(e));
std::cout << t.name() << "\n"; std::cout << t->name() << "\n";
entry resume_data; entry resume_data;
try try
{ {
std::stringstream s; std::stringstream s;
s << t.name() << ".fastresume"; s << t->name() << ".fastresume";
boost::filesystem::ifstream resume_file(save_path / s.str(), std::ios_base::binary); boost::filesystem::ifstream resume_file(save_path / s.str(), std::ios_base::binary);
resume_file.unsetf(std::ios_base::skipws); resume_file.unsetf(std::ios_base::skipws);
resume_data = bdecode( resume_data = bdecode(