Commit Graph

241 Commits

Author SHA1 Message Date
arvidn a3440e54bb make aux::session_settings thread-safe. this allows all threads to share the same settings object, which has low contention and is rarely updated 2019-09-01 03:41:36 +02:00
arvidn 7f2a78d0c9 make random_shuffle() take a range instead of two iterators. use random_bytes() instead of std::generate() and random_byte(). Remove unused hasher.hpp includes 2019-02-19 01:48:08 +01:00
arvidn 5383854768 make span's and sha1_hash's index and size types signed (instead of unsigned). Specifically std::ptrdiff_t. In line with the direction of gsl span and reduce signed->unsigned casts 2018-11-16 14:06:22 +01:00
arvidn 3fb05d77d8 fix warnings 2018-10-20 20:56:26 +02:00
arvidn 2d99e994c3 make throwing versions of read_resume_data 2018-10-07 12:41:53 +02:00
arvidn 109db58641 merge RC_1_1 into master 2018-09-25 21:33:29 -07:00
arvidn 6c4d1b9143 back-port the patch to split up the progress_notification alert_mask into three new categories, file-, piece- and block progress 2018-09-24 08:52:30 -07:00
arvidn 5530793c75 improve the API for iterating over all files and pieces, with the new strong index types. 2018-06-12 11:44:29 +02:00
arvidn fe612ca167 replace the TORRENT_CFG ABI check with inline namespaces around the symbol that can change ABI based on build configuration options 2018-05-13 19:25:17 +02:00
Arvid Norberg d8c022070f merged RC_1_1 into master 2018-04-21 17:17:55 -04:00
d-komarov 44479bcca3 Fix storage initialization (#2944)
If `default_storage::has_any_file` fails during fastresume data check, `piece_manager::check_no_fastresume` will skip storage initialization. In such case, any storage operation that require part file will cause an application crash.
2018-04-21 18:35:55 +02:00
Alden Torres 2d3e394226 fixing warnings in tests code, part10, final 2018-02-02 20:59:01 +01:00
Alden Torres 73a7050185 fixing warnings in tests code, part7 2018-01-30 12:34:53 +01:00
Alden Torres 11aa4ee66a fixing warnings in tests code, part6 (#2745) 2018-01-29 12:40:44 +01:00
Alden Torres 8d379dd944 fixing warnings in tests code, part3 2018-01-25 09:09:21 +01:00
Alden Torres 7262118177 fixing warnings in tests code, part2 (#2718) 2018-01-23 19:23:57 +01:00
arvidn 0731200149 block_size is a constant, no need in passing it around as a variable 2018-01-03 08:45:25 -05:00
arvidn 6785046c2f introduce a download_priority_t type, for uniform an type-safe piece- and file priorities 2017-11-02 08:20:21 +01:00
Arvid Norberg 60b74d2616 merged RC_1_1 into master 2017-10-10 14:25:12 +02:00
Arvid Norberg 830ef0bedd prevent dependency on openssl from leaking outside of libtorrent (libssl and libcrypto should not be a usage requirement). This cleans up most tests to build without having to also link against openssl 2017-10-09 17:15:35 +02:00
arvidn 5bf28e37b8 make create_torrent flags type-safe 2017-08-04 21:23:42 +02:00
arvidn b38efb6c65 make alert category flags be a strong type 2017-07-26 07:20:47 -07:00
arvidn c4eb4c8b5f use span in torrent_info constructors and deprecate the redundant flags argument 2017-07-22 00:00:44 -07:00
arvidn 4947602a2f make add_torrent_params::flags_t an enum class and move it out into its own header 2017-07-17 01:05:31 -07:00
arvidn c4afb5e949 use a dedicated class template for flags types instead of enum class. It's more backwards compatible and improves ergonomics 2017-07-15 01:15:57 -07:00
arvidn b7642f75d5 move clear_bufs out of storage.cpp into storage_utils 2017-06-21 13:04:05 -04:00
arvidn aa842948a3 storage_params cleanup 2017-06-20 10:27:28 -04:00
arvidn ff454a92d4 unify some operation-enums and strings to use operation_t 2017-06-18 07:31:45 -04:00
Arvid Norberg 5344761da4 make flags to move_storage a proper enum class (#2043) 2017-06-01 04:15:15 -04:00
arvidn ffaabd846c make file open mode flags be an enum class for type-safety 2017-05-28 11:16:59 -04:00
Arvid Norberg 1925d1e7aa add test for recent duplicate add bug (#2003) 2017-05-17 23:04:50 -04:00
arvidn af495da56b use std::function instead of the fileop interface for readwritev() 2017-05-02 08:07:29 -04:00
arvidn 749d0da875 make iovec_t an alias for span<char>, in preparation for removing it altogether in favour of span 2017-04-30 11:49:08 -04:00
arvidn d138f02424 introduce lt namespace alias 2017-04-23 23:43:58 -04:00
arvidn df299fcb00 use boost::variant for disk_io_job in/out parameter, to support holding a proper disk io buffer handle and string 2017-04-17 15:08:27 -04:00
arvidn 79d7ae3638 separate path and filesystem functions out into its own translation unit/header file pair, separating it from the file and directory class 2017-04-11 18:07:55 -04:00
arvidn 51c42adc3e steps towars making file_pool private to disk_io_thread 2017-04-07 08:38:35 -04:00
Arvid Norberg 64ad4f5c96 enable warnings when building tests (#1880) 2017-04-02 14:22:17 -04:00
Arvid Norberg b8e77444d5 use span for read_resume_data() (#1867)
use span for read_resume_data()
2017-03-29 16:10:32 -04:00
arvidn 6cdd598e7c make add_torrent_params movable and have add_torrent/async_add_torrent take it by value 2017-03-26 16:48:57 -04:00
arvidn 6929d051f1 fix build without deprecated functions 2017-03-09 00:19:02 -05:00
arvidn 6d54c20adf merge RC_1_1 into master 2017-03-08 18:01:59 -05:00
arvidn 202386dd9d factor out verify_resume_data to storage_utils 2017-01-20 01:36:03 -05:00
arvidn 934c58a816 merged RC_1_1 into master 2017-01-15 00:45:17 -05:00
Arvid Norberg 2120a13869 fix file rename issue with name prefix matching torrent name (#1524)
fix file rename issue with name prefix matching torrent name
2017-01-13 00:39:49 -05:00
Arvid Norberg 3d06371f31 factor out some common storage utilities out of storage.cpp (#1515)
factor out some common storage utilities out of storage.cpp
2017-01-11 00:42:10 -05:00
arvidn 0c7e86078b merged RC_1_1 into master 2017-01-08 10:18:41 -05:00
arvidn 7957e2a30e fix move_storage() to its own directory (would delete the files) 2017-01-03 21:09:26 -05:00
arvidn a087a283de make tests print to stdout instead of stderr 2017-01-02 11:28:41 -05:00
arvidn 4ebc344e48 make disk_io_thread responsible for the storage object. torrents refer to it by index 2017-01-01 13:54:39 -05:00