Closed MassaRoddel closed 5 years ago
Is this with a torrent with a piece size smaller than 16k?
No, just that the clients (Xunlei so far) request small amounts of data (less than 16k, could be a few hundred bytes) with offsets not aligned to 16k.
interesting. that should clearly be supported. I should add an option to do that in connection_tester
, and ideally have a unit test for it as well
the reason for this assert is that the store buffer (where pending disk writes are queued) only supports lookups by block number.
I could make async_read
a bit more sophisticated, to still look up the right block, and use an offset into it
I'm pretty sure this will fix it: https://github.com/arvidn/libtorrent/pull/3680
please let me know if you have a chance to test it.
Should this build with master branch?
Yes
I get several errors like disk_buffer_holder has no member get(). Is that now data()?
yes, but all those places were changed. I don't know how you would end up with such inconsistency.
you can either apply this patch to your master (and I don't think the patch mentions .get()
) or you update your repo to the pull requests commit, and you get all previous changes in master along with it.
I use the svn bridge https://github.com/arvidn/libtorrent/trunk. Does this no longer refer to master? i.e. I still have block_cache.cpp
I'm not really familiar with any svn bridge. is that something run by github? That link seems dead for instance. Does the svn bridge not give you access to arbitrary git branches? if it does, you could just pull the PR branch
Github runs the bridge so that you simple can connect with a svn client. The link works with svn client for me not with a browser.
I have run some tests with your fix and I got no asserts so far. (used https://github.com/arvidn/libtorrent.git/branches/master)
Github links svn trunk to the default git branch. Currently https://github.com/arvidn/libtorrent/trunk gets you the RC_1_2 branch. That is why I got some problems.
I see. Thanks!
libtorrent version (or branch): master rev 144647
platform/architecture: windows
compiler and compiler version: vs2015
I get assert TORRENT_ASSERT(r.start % default_block_size == 0). Is it not allowed to request blocks smaller than the 16k which could have an offset within 16k?