34 Commits

Author SHA1 Message Date
arvidn 77eb55f31e Transition resolving duplicate and invalid filenames to the new structure where torrent_info and file_storage are immutable and renamed files are recorded in a separate structure. 2025-07-15 17:45:39 +02:00
Arvid Norberg 69001184e1 transition more test facilities to use add_torrent_params and load_torrent_buffer() instead of the deprecated use of torrent_info 2025-02-13 16:19:50 +01:00
arvidn e65623b317 add a simpler overload to bencode() returning a vector<char> 2022-12-19 02:57:06 +01:00
arvidn 6dd1e88cb1 introduce new API for create_torrent, to phase out the use of file_storage for creating torrents. Having a double-use for it complicates things 2022-10-09 08:23:43 +02:00
arvidn 24a42189f4 merged RC_2_0 into master 2022-09-24 16:22:22 +02:00
arvidn e950d14775 fix uses of deprecated functions in simulations 2022-09-23 17:04:16 +02:00
arvidn 964ffc57ba merge RC_2_0 into master 2022-06-23 08:07:28 +02:00
arvidn ed88357b4c merged RC_2_0 into master 2022-05-23 09:17:47 +02:00
arvidn 13b252e1a4 Fix bug when checking files and the first piece is invalid 2022-05-11 12:26:51 +02:00
arvidn f484a0eff6 rerun update_copyright.py 2021-12-07 21:13:48 +01:00
arvidn 2db8b54c08 update copyright headers in source files 2021-06-13 21:04:55 +02:00
Alden Torres 5a0936b4b3 moved deadline_timer.hpp and debug.hpp to aux (#5857) 2021-01-13 16:27:55 +01:00
Alden Torres c71697106e moved copy_ptr.hpp, file.hpp and parse_url.hpp to aux (#5841) 2021-01-09 22:01:31 +01:00
arvidn 6e9f05ab9f restore info_hash() API and name the v2 API info_hashes() 2020-05-30 14:00:24 +02:00
Steven Siloti 86be4287d3 add info hash type 2019-08-10 09:28:38 -07:00
Steven Siloti 1a7ccf240f generate v2 metadata 2019-08-10 09:28:38 -07:00
arvidn f509df655d update naked news to make_unique 2019-02-22 10:48:50 +01:00
arvidn d140d1e20d update addresses 2019-02-11 20:19:08 +01:00
arvidn dc36d67574 update post() and dispatch() to free-function versions 2019-02-11 20:19:08 +01:00
arvidn 8305c40d6a make disk_interface the customization point for storage, rather than storage_interface
remove the disk cache
remove trim_cache disk job
remove zero-storage
mark default_storage_constructor as deprecated
remove storage_interface
remove file_pool and default_storage_constructor. update connection_tester to use disk_io_thread.
only ftruncate files once
optimize hashing, by running sha1 directly on the memory mapped file
use boost-multi_index in file_view_pool
remove flush_piece and flush_hashed, simplify job-fence logic, remove prep_read_job_impl
support noatime
split out mmap implementation into a .cpp file
support hashing of content in part files. wraps up new disk storage
remove flush_piece disk job
separate out store_buffer into its own class
pass session_settings into storage operations instead of assigning a pointer in the storage object
use unordered_map in store_buffer
add fopen-based disk io back-end for non-64 bit systems or systems without mmap
factor out open_mode_t into its own header
first stab at windows memory mapped files support
build all of boost for autotools
remove flag in async_read callback handler
remove old open_mode_t, preadv/readv and coalesce buffers
support sparse and no_cache file flags in mmap
Remove use of overlapped I/O because we're no longer doing any scatter/gather syscalls the use of overlapped is an unnecessary complication.
don't explicitly specify global read and write. On MINGW we need to use libtorrent::read and libtorrent::write instead of the MINGW provided ::read and ::write.

If the underlying file is empty then m_mapping is expected to be null.
It is the caller's responsibilty to notice that the region's size is
zero and not dereference it in that case.

Otherwise there is no good way for users of default_storage::open_file
to determine that the opened file is empty.
2019-01-20 18:29:42 +01:00
arvidn eab1055938 more warnings on appveyor 2018-11-18 11:49:45 +01:00
Arvid Norberg 0e49051f17 make create_random_files() take a span instead of pointer, length parameters 2018-06-11 01:35:31 +02:00
arvidn 5c1b65e9b8 merged RC_1_1 into master 2018-03-12 02:32:12 +01:00
arvidn a06e4f696b track whether a file is eligible for using the partfile on a per-file basis. This is intended to improve backwards compatibility, to better support resuming files downloaded with older versions of libtorrent 2018-03-11 12:52:56 +01:00
arvidn f8fb5c2294 merged RC_1_1 into master 2018-02-10 22:52:12 +01:00
arvidn a1860426b8 defer truncating existing files until the first time we write to them 2018-02-10 18:33:41 +01:00
arvidn e19736f925 fix simulation tests to make them not use deprecated functions 2017-07-26 18:00:03 -07:00
Arvid Norberg 9cebd4569f general cleanup of disk_buffer_holder and tailqueue (#1156)
general cleanup of disk_buffer_holder and tailqueue
2016-09-26 14:22:38 -04:00
arvidn 74fc0fae9d merged RC_1_1 into master 2016-08-21 16:28:49 -04:00
Arvid Norberg b701fb252a clear alert nofify function when calling abort on a session, to avoid touching a destructed session object (#1015) 2016-08-20 11:04:44 -04:00
Arvid Norberg 717ed8bd3b Msvc warnings (#822)
fix msvc warnings in python bindings and simulations
2016-06-18 19:24:27 -04:00
arvidn 2b00eb1b38 refactor and clean up some sim tests 2016-03-27 18:40:49 -04:00
arvidn 0d0048d415 try to evict a volatile piece before allocating a new one for a hash check. It may be faster to check files without growing the cache, or reusing the same buffers. 2016-03-13 12:52:44 -04:00
arvidn f5d5ac4f3a fix bug where disk cache was wiped out after completion file-checking. factor out sim test utilities and reuse them in the regression test 2016-03-06 21:44:38 -05:00