Commit Graph

1065 Commits

Author SHA1 Message Date
Alden Torres ddb274751f using span in crypto_plugin encrypt/decrypt (#934) 2016-07-23 15:54:39 -07:00
Alden Torres f57612b82d rename of aux::array_view to span (#933) 2016-07-22 09:31:42 -07: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 e72f95e0d9 fix test_remap_files (#905)
fix test_remap_files
2016-07-15 14:35:57 -04:00
Arvid Norberg 0a3cb77d23 deprecate and remove guided read cache (#904) 2016-07-10 19:25:26 -04: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 770935cd46 modernize-use-nullptr (#894) 2016-07-09 16:26:26 -04:00
arvidn 76bb6db1ab fixup 2016-07-09 02:34:50 -04:00
Steven Siloti e0c0b14e6c limit crypto messages to 1MB (#884)
limit crypto messages to 1MB
2016-07-04 02:48:13 -04:00
Arvid Norberg 44c048f4f5 fix seed mode and suggest mode (#871)
fix resume data when combining seed-mode with suggest-mode
2016-07-02 16:20:12 -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
arvidn 08aebd2729 format more log messages in alert constructors 2016-06-29 02:02:46 -04:00
arvidn b1e36a53e3 print peer logs directly into the allocation 2016-06-29 02:02:46 -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 31b2a03005 some optimizations (#858)
allow disk I/O callback objects to be moved into disk io jobs
2016-06-27 01:02:00 -04:00
Arvid Norberg c567a66f5e simplify peer_connection's read handlers and the receive buffer. (#853)
simplify peer_connection's read handlers and the receive buffer. removed the concept of soft-packet-size. removed the secondary null-buffer receive path. removed try_read. simplify the buffer class to not be resizeable. make receive_buffer shrink the buffer allocation. add cap to growing the receive buffer. buffer sizes are always divisible by 8.
2016-06-26 20:41:03 -04:00
arvidn 263bd31782 merged RC_1_ into master 2016-06-26 18:07:21 -04:00
arvidn b97ac65c01 don't perform expensive hash of piece data for logging 2016-06-26 13:11:52 -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
Arvid Norberg a9dbbdea37 use array_view instead of std::vector in crypto_plugin interface (#835)
use array_view instead of std::vector in crypto_plugin interface. return a vector of const_buffers for prepending new buffers. use stack allocated (single buffer) iovecs for receives. general cleanup
2016-06-19 23:05:59 -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
Alden Torres efa8bb0fc7 making disk_buffer_holder internal and include cleanup (#827)
making disk_buffer_holder internal and include cleanup
2016-06-17 17:40:22 -04:00
Arvid Norberg 4d927f4029 modernize disk_buffer_holder to be move-only (#824)
modernize disk_buffer_holder to be move-only
2016-06-16 08:24:41 -04:00
Arvid Norberg c0fb61c5d7 replace the suggest-read-cache logic with something much simpler (#815)
replace the suggest-read-cache logic with something much simpler that doesn't schedule regular jobs and doesn't query the disk cache
2016-06-15 13:29:54 -04:00
Arvid Norberg ce161a9d62 remove option to disable contiguous receive buffers (#818)
removed option to disable contiguous receive buffers
2016-06-15 08:04:53 -04:00
arvidn 4b186130e6 fix merge 2016-06-14 21:16:28 -04:00
Arvid Norberg 4e0a4db9b4 fixed inverted priority of incoming piece suggestions (#809) 2016-06-12 20:36:05 -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 327af3a69e optimize allow-fast logic (#800)
optimize allow-fast logic
2016-06-10 01:24:37 -04:00
Arvid Norberg 404d72b9b7 revert handshake round-trip optimization (#797)
revert handshake round-trip optimization. it prevents taking advantage of FAST extensions since the bitfield is sent before receiving the other peer's handshake
2016-06-10 01:14:37 -04:00
Arvid Norberg 830a79dbcf optimize allow-fast logic (#800)
optimize allow-fast logic
2016-06-09 08:02:41 -04:00
Arvid Norberg 5eaf713d1f revert handshake round-trip optimization (#797)
revert handshake round-trip optimization. it prevents taking advantage of FAST extensions since the bitfield is sent before receiving the other peer's handshake
2016-06-07 21:45:48 -04:00
Arvid Norberg 8c8f5bb03b deprecated public to_hex() and from_hex() functions (#784) 2016-06-04 10:01:43 -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 748af6eec1 general cleanup. remove valgrind markup, log_hash_failures and C headers (#752)
general cleanup. remove valgrind markup, log_hash_failures and C headers
2016-05-23 08:15:39 -04:00
arvidn aa0d29b67d merged RC_1_1 into master 2016-05-19 01:28:22 -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
Arvid Norberg 4057aa0391 fix issue with comparison of cached time and real-time (#719) 2016-05-09 08:21:00 -04:00
Arvid Norberg c91a700c07 Msvc warnings (#685)
fix msvc warnings and build examples with warnings-as-errors
2016-05-02 12:36:21 -04:00
Arvid Norberg 0d2c04cb2e remove network thread pool feature (#688)
remove network thread pool feature (it was messy and mostly useful for bittorrent over SSL). The proper solution is to allow every peer run in its own asio strand and have multiple threads running the io service
2016-05-02 02:18:51 -04:00
Steven Siloti ff0675e64e use standard array container (#676) 2016-04-30 23:10:47 -04:00
Arvid Norberg 10ec0234a7 remove resolve-country feature (#656) 2016-04-28 08:20:47 -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
Arvid Norberg c9c6dd2d3b clean up the annotations used for asio debugging (#639)
clean up the annotations used for asio debugging (tracking outstanding async operations)
2016-04-23 17:29:25 -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
Steven Siloti 9ffadcde62 allow peers to resume allocating disk buffers when their last outstanding write completes 2016-04-09 16:48:05 -07:00
arvidn 3e7a6b03e5 remove dead code in peer_connection 2016-03-21 18:47:17 -04:00
arvidn 85cf5ac195 remove unused aligned_holder class. fix logging issue of out-of-bound piece requests 2016-03-19 23:32:50 -04:00
arvidn 317eb2fe2a remove unused disk allocation code 2016-03-16 20:13:28 -04:00
arvidn 08bac479be allow each peer have at least 2 allocated disk blocks at any given time, to avoid stalling when cache_size setting is small. also deprecate use_write_cache 2016-03-16 00:28:11 -04:00
arvidn 58e73c1469 fix typo 2016-03-13 20:47:50 -04:00
arvidn 8f14c74be8 fix issue where a seed could time-out an unchoked peer for not sending any requests, despite being busy servicing requests from the peer (and time out immediately when m_requests is drained) 2016-03-13 16:41:31 -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 b9ec183e24 increase default connect speed. minor cleanup. add logging for short lived connections 2016-03-03 01:20:15 -05:00
arvidn 88b7e3768f add sim test for optimistic unchoke round-robin distribution 2016-02-01 20:28:30 -05:00
arvidn efe32c6a0e rewrite most of web_peer_connection::on_receive to make it a lot simpler and fix edge cases with pad-files 2016-01-28 01:58:33 -05:00
arvidn 1f9f588e75 merge copyright year update and changelog from RC_1_0 2016-01-17 18:57:46 -05:00
arvidn 645b121df6 deprecate resolve-countries 2015-12-14 21:32:30 -05:00
arvidn d505f93d7a port sim tests to use the new setup_swarm API 2015-12-12 00:41:47 -05:00
arvidn cc3b064cff fix graceful pause issue. peers regularly check whether they should disconnect or not 2015-12-04 23:27:43 -05:00
arvidn e9c0fc8eb5 fix bug that disabled rarest-first piece picking. introduced when removing speed-affinity in the piece picker 2015-11-29 08:26:00 -05:00
arvidn fd3b53604c add new piece picker logging alert category 2015-11-29 08:25:55 -05:00
arvidn a8e31fd8ca add first coverage of test_transfer as a proper sim 2015-11-28 00:59:39 -05:00
arvidn a138b2daa9 handle receiving an invalid request 2015-11-07 14:58:08 -05:00
arvidn 5da511f140 now that force-started torrents aren't affected by the auto-manager, they need to be explicitly kicked when entering checking state (it would be nice if all this could be done through set_state()) 2015-09-29 20:49:38 -04:00
arvidn c0a4f7ba26 fix super seeding assert (forward port from RC_1_0) 2015-09-08 18:17:13 -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 beb5455331 add disk I/O read asserts and fix i2p issue if a tracker responds with i2p peers when i2p is not configured on the client 2015-08-28 07:20:21 -04:00
arvidn 6012306557 add more asserts for the size of the bitfields peers send 2015-08-27 21:48:52 -04:00
arvidn a42f9e0c63 fix more warnings 2015-08-22 00:28:12 +02:00
arvidn 4873004df7 warnings as errors 2015-08-21 14:52:07 +02:00
arvidn ffa870d280 fixed some GCC warnings 2015-08-20 01:33:20 +02:00
arvidn 5c8fc818c1 fix more warnings 2015-08-19 01:39:01 +02:00
arvidn f6b86dc4b5 add typesafety to piece_picker torrent_peer pointers. and fix a few incorrect uses 2015-08-18 04:25:13 -04:00
arvidn 9a0092c120 fix some warnings 2015-08-16 12:17:23 -04:00
arvidn a81ca2391b fix some warnings 2015-08-10 20:03:24 -04:00
arvidn 1c1698459c fix warnings 2015-08-08 22:53:11 -04:00
Alden Torres 1356332496 Avoid a possible null pointer error when logging on peer_connection::on_connection_complete. 2015-08-07 00:30:28 -04:00
arvidn 655a3ae019 fix some warnings 2015-08-01 23:57:11 -04:00
arvidn 29c618c3e5 merge bittorrent-slow start fix from RC_1_0 2015-07-27 16:53:25 -07:00
arvidn 6c5aec3476 fix request queue size performance issue 2015-07-20 08:20:17 -07:00
arvidn 6c7c0cd878 fix up some old logging defines and improve the log output for send buffer watermark and request queue length 2015-07-17 23:54:25 -04:00
arvidn 2739def57f minor cleanups. use libtorrent typedefs for asio. failing to bind IPv6 UDP socket is no longer fatal. removed some redundant listen_failed_alerts 2015-07-11 23:01:27 -04:00
arvidn 2b05b1c85c fix cppcheck warnings 2015-07-11 10:36:13 -04:00
arvidn a63cfd2a95 improve logging (specifically don't emit bandwidth limiter logs when it's disabled) 2015-07-05 18:44:02 -04:00
Mikhail Titov 77ca1ac16f Quadruple handshake timeout for i2p 2015-06-24 19:40:17 -05:00
arvidn 323af56cc2 update interest when changing upload-only mode 2015-06-16 01:24:35 -04:00
arvidn 41533205be drop support for boost 1.35 and fix some more references to the asio namespace 2015-06-06 02:10:53 -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 12c9d3de26 fix more warnings 2015-05-16 18:35:47 +00:00
Arvid Norberg 2bf4519bee make the torrent hold a pointer to the ip_filter instead of relying on a session reference 2015-05-16 06:33:37 +00:00
Arvid Norberg e7f9f35556 fix mistake in download_queue_time 2015-05-13 00:02:01 +00:00
Arvid Norberg 1357fd5265 clean up usage of printf attribute (encapsulate it in a macro) 2015-05-10 05:11:51 +00:00
Arvid Norberg a83dcbaaf0 removed access-log build option and log parser. added incoming_request_alert. This feature can now be implemented by clients 2015-05-09 03:04:08 +00:00
Arvid Norberg 4a304273fd fix some coverity issues 2015-05-03 03:28:39 +00:00
Arvid Norberg 4f216dece3 factor out strings of peer logs to be enums instead, in peer_log_alert 2015-05-03 02:53:54 +00:00
Arvid Norberg 42120014d0 merged changes from RC_1_0 2015-04-28 04:01:40 +00:00