Commit Graph

241 Commits

Author SHA1 Message Date
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
Arvid Norberg 15ab8f387b cleaning up of disk_interface and improving type safety (#1353)
cleaned up disk_interface and improved type safety. removed unused disk status code disk_check_aborted, and removed status code return value for async_hash
2016-11-26 01:51:47 -05:00
arvidn f08501b869 update callback interface for async_check_files and async_flush_piece 2016-11-23 19:02:05 -05:00
arvidn 14236993ea collapse logic in piece_manager into storage directly 2016-11-13 02:53:16 -05:00
arvidn ccd539f977 pull check resume data logic out of piece_manager into disk_io_thread and simplify it 2016-11-12 18:03:18 -05:00
arvidn 583082a3a0 merged RC_1_1 into master 2016-11-09 19:53:55 -05:00
arvidn 11ca69b9fc simplify disk_io_thread interface by setting the number of threads via settings rather than a separate function 2016-11-06 23:07:09 -05:00
arvidn 200b3c4965 add rename file test 2016-11-05 15:20:38 -04:00
Arvid Norberg 8daa200d11 simplify interaction with disk_io_thread by removing the uncork interface (#1271)
simplify the interaction with the disk_io_thread by removing the uncork interface. This should be turned into a transparent part of peer_connection instead and remove cork logic from peer_connection
2016-10-30 18:21:07 -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 6751a1eeb1 removed spaces in template types and more c++11 auto/loop refactor 2016-10-26 00:08:00 -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
Arvid Norberg 6148984426 remove whitespace at end of line (#1245) 2016-10-22 11:47:24 -04:00
arvidn 6c805bd06d simplify print statements in tests 2016-10-09 20:23:45 -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 4c53d7b2da refactor to use std unordered containers and minor cleanup (#1070) 2016-09-06 23:37:36 -04:00
Alden Torres bf0008933a refactor to use std::shared_ptr with peer_connection, core and tests (#1050) 2016-08-31 21:42:18 -04:00
Alden Torres cdb15ba886 refactor to use std::shared_ptr with torrent (#1048) 2016-08-31 08:27:36 -04:00
Alden Torres e2487c4d24 more use of std::shared_ptr refactor 2016-08-30 10:10:53 -04:00
Alden Torres 5789b02e1b storage_interface refactor to use span and references (#1007)
storage_interface refactor to use span and references
2016-08-18 11:57:50 -04:00
Alden Torres bb388563b3 refactor to use torrent_info with std::shared_ptr (#1006) 2016-08-17 17:26:35 -04:00
arvidn 8c8c3d5587 replace boost::function with std::function 2016-08-13 07:07:26 -04:00
Arvid Norberg 7bf49c0a1c modernize hasher to use array_view (#931)
modernize hasher to use array_view as well as adding array_view support to entry
2016-07-22 07:29:39 -07:00
Arvid Norberg 8c03718117 apply modernization transforms to headers too. nullptr, explicit constructors, = default (#903) 2016-07-10 14:27:42 -04:00
Arvid Norberg e782783814 modernize use override (#895) 2016-07-09 20:10:38 -04:00
Arvid Norberg 770935cd46 modernize-use-nullptr (#894) 2016-07-09 16:26:26 -04:00
arvidn f5bb8c4b77 improve test robustness 2016-07-01 00:24:52 -04:00
Arvid Norberg 97ad7510af minor refactoring to move-storage patch (#680)
minor refactoring to move-storage patch
2016-06-29 20:05:28 +03:00
Vladimir Golovnev faef995cdc Move storage "file-by-file" (#632)
When moving storage for a torrent, only move files belonging to the torrent, one by one.
2016-06-29 20:05:16 +03:00
Arvid Norberg eda956f13a use standard library for suspending threads (#855)
use standard library for suspending threads
2016-06-26 09:24:06 -04:00
Arvid Norberg ed077c8358 use cstdint intead of boost/cstdint.hpp (#833)
use cstdint intead of boost/cstdint.hpp
2016-06-18 14:01:38 -04:00
Steven Siloti 2fed4103f8 scalable thread pool (#770) 2016-06-15 20:49:28 -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 96999ad67f replace uses of boost::bind with std::bind and lambdas (#745) 2016-05-25 00:31:52 -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 674641acce fix file_storage::m_paths memory reuse (#724)
fix file_storage::m_paths memory reuse after rename_file with path delimiter
2016-05-12 16:45:23 -04:00
Arvid Norberg 0d5428a664 minor refactoring to move-storage patch (#680)
minor refactoring to move-storage patch
2016-05-01 12:23:02 -04:00
Vladimir Golovnev 64cb8b236a Move storage "file-by-file" (#632)
When moving storage for a torrent, only move files belonging to the torrent, one by one.
2016-04-30 22:18:38 -04:00
Arvid Norberg 20b41ad0b9 Threads (#671)
use std::thread, std::mutex, std::condition_variable instead of pulling them in from boost.asio internals.
2016-04-30 18:54:23 -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 c41ab094be fix release build with VS2015 UP2 compiler warnings for: examples, test, tools (#627)
fix release build with VS2015 UP2 compiler warnings for: examples, test, tools
2016-04-20 00:45:32 -04:00
arvidn 867b83ccda merged RC_1_1 into master 2016-04-08 02:20:24 -04:00
arvidn 6bc5de5903 fail correctly when move_storage is called to move into its own directory 2016-04-02 10:03:31 -04:00
arvidn f662d86458 fix merge issue in test_storage.cpp 2016-03-30 02:06:10 -04:00
arvidn fd4a46342f merge RC_1_1 into master 2016-03-30 00:33:29 -04:00
arvidn b16f43132b Merge branch 'RC_1_1' 2016-03-20 20:39:49 -04:00
arvidn f5c112eefc remove remaining references to storage_mode_compact (since it's been deprecated for quite a while now, and no longer implemented) 2016-03-20 18:25:24 -04:00
arvidn 2dd28c1708 just use malloc/free in test_storage (instead of page_aligned_allocator). file no longer requires alignment 2016-03-20 17:00:49 -04:00
arvidn f79a9c7adf merged RC_1_1 into master 2016-03-16 19:59:53 -04:00
arvidn 921cbeebed add option to delete just the partfile when removing a torrent 2016-03-14 08:26:39 -04:00
arvidn 516db1fc97 fix python binding 2016-02-20 12:51:06 -05:00
arvidn c9d7e54d7b make tests pass 2016-02-20 12:50:52 -05:00
arvidn 8135ea326f rename async_check_fastresume to async_check_files, and make it take an add_torrent_params object instead of bencoded resume data 2016-02-20 02:00:07 -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
arvidn 0cb35d714c fix test in test_storage 2016-01-20 19:38:18 -05:00
arvidn 07574117ad add test for readwritev and experiment with SEH handler in test 2015-11-19 17:58:56 -05:00
arvidn 964031c070 factor out readwritev to a free function, to allow unit testing of it 2015-11-19 17:58:55 -05:00
arvidn b628692223 separate out announce_entry and torrent_status into their own headers 2015-09-18 08:08:08 -04:00
arvidn ffa870d280 fixed some GCC warnings 2015-08-20 01:33:20 +02:00
arvidn 7d2deb01db split up test_storage into smaller test cases to improve output on failures 2015-06-20 22:34:44 -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
arvidn 0d6e65ec24 improve reliability of some of the unit tests 2015-06-10 01:22:01 -04:00
arvidn 389ffc622c don't pull in the asio namespace in libtorrent. refer to it by boost::asio 2015-06-06 01:24:25 -04:00
Arvid Norberg 84849f3afd some msvc fixes 2015-05-30 21:46:59 +00:00
Arvid Norberg f9c9d0ad0d merge small unit tests to make running the tests quicker. expand the test framework a bit. add ax_boost_random.m4 script to link against boost.random correctly from makefile. 2015-05-30 04:31:23 +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 5dc00969f8 fix more warninigs 2015-05-06 02:13:03 +00:00
Arvid Norberg 3ea67e2bf5 move time_now_string out to the unit test library (basically unused in libtorrent itself) 2015-04-24 03:48:08 +00:00
Arvid Norberg baaeac7809 extend some unit tests. primarily test_alert_manager and fixed a bug in alert_manager 2015-04-11 18:44:43 +00:00
Arvid Norberg 013ed36f09 landed alert_queue feature branch into trunk 2015-04-03 20:15:48 +00:00
Arvid Norberg ccc7e45406 landed mutable torrents branch in trunk 2015-03-21 00:12:40 +00:00
Arvid Norberg badd763f86 make tests not use internal aux::time_now function 2015-03-15 15:22:01 +00:00
Arvid Norberg 6c1df7eb55 landed the bdecode branch in master. lazy_bdecode/lazy_entry is now being replaced by bdecode/bdecode_node 2015-03-12 05:20:12 +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 40980df545 extend storage unit test to cover iovec operations 2015-02-15 07:31:35 +00:00
Arvid Norberg 3fbc0f05c6 add unit test for default_storage::rename 2015-01-16 04:02:44 +00:00
Arvid Norberg 764b09d6b5 make the peer fingerprint a regular setting and remove it from the main session constructor argument list 2014-12-31 15:51:45 +00:00
Arvid Norberg 5666cdcd07 fix warnings 2014-12-09 09:33:34 +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 7351389ce8 land libtorrent_aio branch in trunk 2014-07-06 19:18:00 +00:00
Arvid Norberg a0a41b6c5e merged file priority fix from RC_0_16 and keep the disk thread's file priorities up to date 2014-02-28 10:19:29 +00:00
Arvid Norberg 6c22d426d4 make all unit tests pass msvc's /RTCc instrumentation (no implicit integer truncation in casts) 2014-02-05 09:38:32 +00:00
Arvid Norberg 3f66a65917 assert that create_torrent returns a valid torrent_info pointer 2013-12-30 06:47:15 +00:00
Arvid Norberg 5b46be916b merged storage fix from RC_0_16 2013-12-30 02:50:29 +00:00
Arvid Norberg df3204874d clean up entry::print 2013-12-19 08:30:17 +00:00
Arvid Norberg fdab2e61da fix test_storage 2013-09-02 21:30:58 +00:00
Arvid Norberg 3bd53f88ef fix build with internal_file_entry being deprecated without deprecated functions 2013-08-12 07:30:57 +00:00
Arvid Norberg 93f9d4b3b0 test fixing 2013-08-01 08:03:11 +00:00
Arvid Norberg 09f29217ee test fixes 2013-08-01 04:58:43 +00:00
Arvid Norberg 63cce14cf9 fix issue in previous patch to test_storage and optimized it a bit 2013-08-01 01:02:26 +00:00
Arvid Norberg 86ce8fbb0a fix test_storage 2013-08-01 00:21:56 +00:00
Arvid Norberg c0da76ac84 some windows fixes for unit tests 2013-07-23 07:32:38 +00:00
Arvid Norberg 9c9135bfc4 don't use pointers to resume_data and file_priorities in add_torrent_params 2013-07-17 20:21:48 +00:00
Arvid Norberg 1523a196e5 fix fallocate issue when filesystem doesn't support it 2013-06-24 03:26:17 +00:00
Arvid Norberg 3b9fd38c22 fix build of test_storage without deprecated functions 2013-06-18 07:33:49 +00:00
Arvid Norberg 8f3723cdef support renaming files to absolute paths 2013-06-09 22:30:02 +00:00
Arvid Norberg 01c8c8543b fix typo in move_storage 2013-05-11 21:32:18 +00:00
Arvid Norberg 90a2509d68 fix bug in recent move_storage patch 2013-05-10 02:18:14 +00:00
Arvid Norberg 982a14c2e9 extend move_storage functionality to have more flexible behavior 2013-05-09 02:50:16 +00:00