Aleksey Yashchenko | 8 Jun 2011 09:27
Picon
Gravatar

Assertion in session_impl::recalculate_auto_managed_torrents

Hello all!

I'm hitting this assertion:

void session_impl::recalculate_auto_managed_torrents()
> {
> ...
> TORRENT_ASSERT(t->m_resume_data_loaded);

right after torrent creation.

My torrent isn't automanaged and its created in this way (error checks
omitted):

libtorrent::create_torrent t(....)
> libtorrent::set_piece_hashes(t, destination);
> const entry& e = t.generate();
> add_torrent_params p;
> p.ti.reset(new torrent_info(e));
> p.save_path = destination;
> p.auto_managed = false;
> p.paused = false;
> p.seed_mode = true;
> torrent_handle th = session->add_torrent(p);
> th.save_resume_data();
> //...

So, when session_impl::tick() comes, torrent's m_resume_data_loaded ==
false.
What I'm doing wrong?

I found that it is set to true only in torrent::init() which is called from
torrent:start(), which in turn (I guess) is called by session itself.

Can you please advise me on what shall I do to avoid this assertion and give
a hint what is this member (m_resume_data_loaded) for?

Thanks!

~Leha
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev

Gmane