Commit Graph

81 Commits

Author SHA1 Message Date
Arvid Norberg bfe0e1f27d hide some internal functions. error if namespaces are preceded by whitespace (as the docs generation script requires them to start at the beginning of the line) 2019-08-07 20:48:26 -07:00
arvidn 102387f4a8 make all tests run cleanly with leak sanitizer 2019-03-27 17:10:36 +01:00
Arvid Norberg a4267d61e7 fix overflow in sliding_average in the case of very high download rates 2018-10-03 00:53:05 +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
arvidn 8621477239 merged RC_1_1 into master 2018-04-28 14:36:24 +02:00
Steven Siloti f5e33932d2 fix use after free in flush_range and flush_iovec
Calling blocks_flushed can cause the piece entry to be freed so its
callers need to be aware of that and avoid dereferencing the pointer if
the entry is freed.
2018-04-27 16:15:19 +02:00
arvidn f0227451a6 merged RC_1_1 into master 2018-04-13 01:47:41 +02:00
arvidn aaf9304a3b update year in copyright header 2018-04-09 09:04:33 +02:00
Alden Torres f0cd6492bd minor lint oriented cleanup and refactor in headers 2018-02-17 00:52:35 +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 c3bdc6f825 use an intrusive linked list for peer_cache_entry instead an unordered set, to avoid heap allocations and make cache operations not able to fail. This simplifies error handling 2017-12-28 00:52:09 +01:00
arvidn c66f4cc62a fix some warnings, mostly 0 -> nullptr 2017-09-28 07:33:10 -07:00
arvidn 7717c02c2f run sonarqube with deprecated functions disabled. fix some of its code smells 2017-09-17 18:06:53 +02:00
arvidn fe1c395579 merged RC_1_1 into master 2017-09-03 13:57:19 +02:00
arvidn 6b1037eff5 convert enum values that are just used as constants, to actual constants with the correct type 2017-08-04 15:23:20 +02:00
arvidn f85c01cc0a merged RC_1_1 into master 2017-06-21 00:51:43 -04:00
arvidn f04d729d43 enforce spell checking on CI 2017-06-18 15:51:51 -04:00
arvidn 9a19ff344b remove resolve_links disk job left-overs and convert some C-arrays to std::array 2017-06-13 20:35:55 -04:00
arvidn 147d996160 make the job action enum an enum class 2017-06-11 23:53:58 +02:00
Pavel Pimenov de369451b1 fix operator() ==, add const (#2063) 2017-06-10 08:18:32 +02:00
arvidn 4de9f6a75b remove requester parameter to disk read jobs 2017-06-08 12:38:25 +02:00
arvidn 6967d17a42 make move constructors and move assignment operators noexcept 2017-06-01 23:42:15 +02:00
arvidn 04c76249b6 merged RC_1_1 into master 2017-04-21 01:21:31 -04:00
arvidn 227830e757 fix memory leak in the disk cache. if a cached_piece_entry would stick around in a ghost list (ARC), it would keep the torrent object itself alive. when aborting read jobs, the outstanding_read flag need to be cleared on the piece. When reclaiming a block for a piece that should be deleted (not just evicted) it need to know that. This patch adds an additional bit to cached_piece_entry to communicate this 2017-04-19 22:30:27 -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 480bde9333 change formatting of namespace declarations 2017-04-12 14:26:35 -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
Alden Torres 2bc7a60f33 fixing sign-conversion warnings, part 8, created aux::unique_ptr, refactor (#1616)
fixing sign-conversion warnings, part 8, created aux::unique_ptr, refactor
2017-01-26 08:31:20 -05:00
Alden Torres df6cb6a48d fixing sign-conversion warnings, part 4, minor refactor (#1549)
fixing sign-conversion warnings, part 4, minor refactor
2017-01-14 18:53:25 -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 41dbb47123 compact block_cache_reference by using storage_index_t instead of pointer. make sure storage object is kept alive by block_cache_references 2017-01-02 13:45:16 -05:00
arvidn 5ed0086b51 removed mmap_cache feature 2016-12-25 21:12:49 -08:00
Arvid Norberg 3f1084d63d strengthened type safety in handling of piece and file indices (#1409)
strengthened type safety in handling of piece and file indices
2016-12-22 10:42:33 -05:00
Alden Torres d5c4cd7280 fixed sign-compare warnings and some refactor (#1354)
fixed sign-compare warnings and some refactor. make sequence_number backed by std::int64_t
2016-11-27 08:46:53 -05:00
Alden Torres c30027e4a1 more integral type conversion warning fixes, now only needs shorten-64-to-32 (#1349)
more integral type conversion warning fixes, now only needs shorten-64-to-32
2016-11-25 11:17:25 -05:00
arvidn d5b76d2237 move block_cache_reference out of disk_io_job header 2016-11-20 10:34:42 -05:00
Andrei Kurushin 0a31e26344 fix logging=off build 2016-11-16 23:14:28 -05:00
arvidn 14236993ea collapse logic in piece_manager into storage directly 2016-11-13 02:53:16 -05:00
arvidn 2a999e1ea7 merge RC_1_1 into master 2016-11-03 23:58:35 -04:00
Arvid Norberg f5c7a49d61 remove incorrect deleted-storages assert and add some more test coverage in test_metadata_extensions (#1286) 2016-11-03 19:39:42 -04:00
Alden Torres dac0b9ec64 more use of nullptr, minor refactor and formatting (#1267) 2016-10-28 12:28:27 -04:00
Steven Siloti f5366bd816 use span for scatter/gather lists (#1260)
use span for gather/scatter buffers. remove explicit size parameter from file_op
2016-10-26 20:40:56 -04:00
Alden Torres 8bdbaec872 minor cleanup refactor (#1252) 2016-10-24 20:19:01 -04:00
Arvid Norberg 2d2874d252 minor block_cache cleanup. make hash be a unique_ptr (#1241) 2016-10-21 07:37:15 -04:00
Arvid Norberg 524f7b1c27 fix error handling by exercising code paths where memory allocations fail (#1221)
fix error handling by exercising code paths where memory allocations fail
2016-10-19 01:18:05 -04:00
Arvid Norberg 20f65946f2 make single-argument constructors explicit (#1194)
make single-argument constructors explicit
2016-10-08 14:07:11 -04:00
Alden Torres 8caebbd026 alerts refactor to use span, don't break ABI when logging, fix compilation (#1159)
alerts to use span, don't break ABI when logging, fix compilation
2016-09-27 23:21:18 -04:00
Alden Torres 4c53d7b2da refactor to use std unordered containers and minor cleanup (#1070) 2016-09-06 23:37:36 -04:00
Alden Torres b313de3925 some refactor and cleanup (#1065) 2016-09-05 22:25:20 -04:00
Alden Torres e2487c4d24 more use of std::shared_ptr refactor 2016-08-30 10:10:53 -04:00