Commit Graph

125 Commits

Author SHA1 Message Date
arvidn 14236993ea collapse logic in piece_manager into storage directly 2016-11-13 02:53:16 -05:00
arvidn 3ff89f29d7 remove explicit ticking of storage from the torrent. instead make the disk_io_thread do it automatically 2016-11-06 10:26:10 -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
Arvid Norberg 09cbd0a51d remove deprecated disk_io_thread operations (#1284) 2016-11-02 01:01:27 -04:00
Arvid Norberg b61ebca14a moved async-load-torrent feature out of disk-io-thread (#1282)
moved async-load-torrent feature out of disk-io-thread into a generic worker thread
2016-11-02 01:01:04 -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
Steven Siloti a6e5ba8804 return a span from TORRENT_ALLOCA (#1244)
return a span from TORRENT_ALLOCA

Unfortunately this requires moving the variable declaration inside the macro.
Due to alloca’s unique properties pretty much the only safe way to call it is
in a simple assign-to-pointer expression. Therefor we need to use a temporary
pointer to store the value returned from alloca before we can call span’s ctor.

This also causes double evaluation of the size parameter which is unfortunate,
but no current callers of TORRENT_ALLOCA have a problem with this. Passing
expressions with side effects to macros is bad mojo anyways.
2016-10-22 14:43:40 -04:00
arvidn 31d34fec41 fix issue in previous block_cache patch 2016-10-22 11:08:19 -04:00
Arvid Norberg 2d2874d252 minor block_cache cleanup. make hash be a unique_ptr (#1241) 2016-10-21 07:37:15 -04:00
Alden Torres a12f62593e minor code refactor in disk_io_thread and block_cache (#1238) 2016-10-21 00:25:48 -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
Alden Torres af92e91a90 missing inc dht counter and minor cleanup (#1164) 2016-09-28 23:25:08 -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
arvidn 8c8c3d5587 replace boost::function with std::function 2016-08-13 07:07:26 -04:00
Arvid Norberg 770935cd46 modernize-use-nullptr (#894) 2016-07-09 16:26:26 -04:00
Arvid Norberg 1facf0eef6 clean-up more defines (#872)
clean-up more defines. remove TORRENT_DEBUG and TORRENT_DISABLE_INVARIANT_CHECKS (instead use TORRENT_USE_ASSERTS and TORRENT_USE_INVARIANT_CHECKS)
2016-07-01 19:46:59 -04:00
Arvid Norberg a675682b6c some cleanup of TORRENT_DEBUG defines (#863)
some cleanup of TORRENT_DEBUG defines
2016-06-27 22:28:51 -04:00
Arvid Norberg 6aabe3762b general modernization (#836)
general modernization. use nullptr instead of NULL, use std::tuple instead of boost::tuple, transition some unordered set/map from boost to std. some clean-up of includes
2016-06-20 11:32:06 -04:00
arvidn dfc2206b9f merged RC_1_1 into master 2016-06-11 01:00:41 -04:00
Arvid Norberg 5ecd00c5c5 fix osx build (#804)
fix osx build with asserts enabled
2016-06-11 00:48:13 -04:00
Arvid Norberg 223f24ca27 some cleanup and transition to std::unique_ptr (#786)
some cleanup and transition to std::unique_ptr
2016-06-05 14:07:24 -04:00
Arvid Norberg e8380e1d0b factor out includes from config.hpp into the files actually using it. primarily, printf family of functions, since C++11 version is used now. This removes the need for an snprintf-wrapper on windows (#732) 2016-05-17 09:24:06 -04:00
Andrei Kurushin 62eb956c54 fix x64 build with VS2015 UP2 compiler (#640)
fix VS2015 compiler warnings for: address-model=64, deprecated-functions=on, link=shared
2016-04-25 17:22:09 -04:00
Andrei Kurushin 7b5d48c02a fix default release build with VS2015 UP2 compiler warnings (#624)
* fix default release build with VS2015 UP2 compiler warnings
this will allow to successfully build:
bjam toolset=msvc-14.0 release deprecated-functions=off character-set=unicode link=static warnings-as-errors=on
2016-04-17 16:56:07 -04:00
arvidn 867b83ccda merged RC_1_1 into master 2016-04-08 02:20:24 -04:00
arvidn cee2b16949 fix some coverity warnings and move out code to torrent_status.cpp 2016-04-07 21:44:24 -04:00
arvidn 96e2693d13 merge RC_1_1 into master 2016-03-19 16:02:46 -04:00
arvidn f7c9062019 deprecate more parts of explicit cache as well as fixing typos of TORRENT_NO_DEPRECATE preprocessor tests 2016-03-19 07:54:29 -04:00
arvidn f79a9c7adf merged RC_1_1 into master 2016-03-16 19:59:53 -04:00
arvidn 55cd19d1e2 remove the purgable control patch. It adds a lot of complexity and it does not perform well 2016-03-14 01:48:00 -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 2178d1ad2b improve robustness and performance of uTP PMTU discovery. fix duplicate ACK issue in uTP. demote an invariant check to 'expensive' 2016-03-13 12:40:59 -04:00
arvidn 6d85c7c5f0 merge RC_1_1 into master 2016-03-08 01:10:48 -05:00
arvidn 2bd6ad9974 remove invalid assert in the disk thread 2016-03-04 20:20:49 -05:00
arvidn ae7058e119 remove the timestamps and file sizes from the resume data. This makes saving resume data alot cheaper, since it doesn't have to go via the disk thread. It also removes an old-standing API usage issue where there was easily a race condition introduced between saving resume data and pausing a torrent. 2016-02-06 15:50:55 -05:00
Alden Torres 218d33c545 Documentation typos and minor cleanup 2016-01-20 20:48:23 -05:00
arvidn 1f9f588e75 merge copyright year update and changelog from RC_1_0 2016-01-17 18:57:46 -05:00
arvidn a2ea8b32db fix more warnings 2015-09-06 22:55:41 -04:00
arvidn 17c5759829 disable warning for unused command line argument and fix warnings. remove redundant travis build config. use new preprocessor on clang to avoid warnings 2015-09-06 22:55:41 -04:00
arvidn b45c585a78 use gcc on linux and clang on osx 2015-09-06 22:55:41 -04:00
arvidn 8cf8e65861 turn linked_list into a template to improve type safety and remove some casts 2015-08-20 02:02:46 +02:00
arvidn ffa870d280 fixed some GCC warnings 2015-08-20 01:33:20 +02:00
arvidn bd177a857f make tailequeue a template, introduce type safety, remove old-style casts 2015-08-19 15:22:05 +02:00
arvidn a91e7ce25d fix warnings 2015-08-06 02:30:06 -04:00
arvidn e0c3d28321 fix some warnings 2015-08-02 15:55:05 -04:00
arvidn 655a3ae019 fix some warnings 2015-08-01 23:57:11 -04:00
arvidn 5cb095f6d2 support using 0 disk threads (to perform disk I/O in network thread) 2015-06-14 16:00:04 -04:00
Arvid Norberg d43f7b56a2 update copyright year 2015-06-03 05:18:48 +00:00
Arvid Norberg 607e708bc4 fix warnings 2015-05-19 03:13:49 +00:00
Arvid Norberg 58ae099cf8 clean up disk_io_job a bit to avoid old-style casts 2015-05-16 20:41:37 +00:00
Arvid Norberg 4b585dcc0e minor cleanup and fix no-deprecated build 2015-05-06 01:11:54 +00:00
Arvid Norberg 0d72163a56 fix coverity warnings 2015-04-29 05:46:35 +00:00
Arvid Norberg 8aa3c22796 fix coverity issues 2015-04-29 04:05:29 +00:00
Arvid Norberg 2fff222235 silence some warnings on msvc 2015-04-27 02:21:12 +00:00
Arvid Norberg 2fb1a0f3c7 fix msvc build issue 2015-04-26 01:25:45 +00:00
Arvid Norberg 821e34c795 fix examples build. fix print formatting bugs. fix some gcc warnings 2015-04-25 04:22:51 +00:00
Arvid Norberg 87c46a144d fix more warnings and some build issues 2015-04-22 04:24:45 +00:00
Arvid Norberg 3664c7c137 fix more warnings and bare_bones build 2015-04-22 00:59:35 +00:00
Arvid Norberg f5629eb403 cleanup and fixing of more warnings 2015-04-21 00:23:00 +00:00
Arvid Norberg 013ed36f09 landed alert_queue feature branch into trunk 2015-04-03 20:15:48 +00:00
Arvid Norberg c1dc982f4f deprecate the ptime type and related time types. just use boost::chrono / std::chrono 2015-03-12 04:34:54 +00:00
Arvid Norberg 1dbba7c410 optimize disk buffer allocation when seeding 2015-02-14 23:20:45 +00:00
Arvid Norberg 0bcbe433ed deprecate most of cache_status type (use session stats instead) 2014-10-25 20:07:50 +00:00
Arvid Norberg 9a2e511dda attempted fix for inconsistent debug refcounters on blocks. pinning pieces with outstanding reads in an attempt at fixing inconsitencies seen around that logic as well 2014-09-14 22:42:18 +00:00
Arvid Norberg 524384045c transition to use boost.random instead of rand() and custom pseudo random generator 2014-08-16 20:26:00 +00:00
Arvid Norberg f32f5e96aa deprecate parts of cache_status and move those counters to session_stats counters. make the performance counters thread safe. fix some issues recently introduced to performance counters and the usage of them in client_test 2014-08-01 06:07:48 +00:00
Arvid Norberg 30713a4a79 remove buffer stats debugging feature 2014-07-19 08:20:20 +00:00
Arvid Norberg d16fe60ca4 some more disk io thread asserts 2014-07-12 22:09:20 +00:00
Arvid Norberg c8e8eb6e15 some asserts in disk_io_thread. fix issue in torrent::initialize 2014-07-12 19:23:31 +00:00
Arvid Norberg 7351389ce8 land libtorrent_aio branch in trunk 2014-07-06 19:18:00 +00:00