Commit Graph

5584 Commits

Author SHA1 Message Date
Arvid Norberg 4057aa0391 fix issue with comparison of cached time and real-time (#719) 2016-05-09 08:21:00 -04:00
Arvid Norberg 5bedf3e7b3 post add_torrent_alert before any other torrent alert (#717)
post add_torrent_alert before any other torrent alert
2016-05-08 23:48:27 -04:00
arvidn 254906eddc back-port torrent peer-class fix from master 2016-05-07 14:56:22 -04:00
Arvid Norberg bcb359cef6 use unsigned long for ioctl commands (#705) 2016-05-06 08:08:49 -04:00
Arvid Norberg 985436636e added new preformatted type to bencode entry (#698)
added new preformatted type to bencode entry to support carrying a verbatim copy of an already bencoded subtree. This is to support saving torrents in resume data and create_torrent based on existing torrents, in order to preserve key order
2016-05-05 21:38:57 -04:00
Arvid Norberg f9bc6dbc54 improvements to socks5 support (for 1.1.1 release) (#567)
capture listen IP and port from socks5 BIND response. add tests for socks5 and improve support for capturing the local endpoint (i.e. bind port) for BIND command socket connections. post listen_succeeded_alert when successfully bound to listen socket on SOCKS5 proxy. make sure to announce the socks5 listen port
2016-05-05 17:09:11 -04:00
Jonathan McDougall f065cacebf * now calling stop_announcing() unconditionally instead of checking !is_paused(), which was always false when aborting a torrent and could cause infinite blocks while destroying a session (#694)
fixed torrent invariant check that wasn't using the m_abort flag and correctly stop trackers when shutting down
2016-05-03 01:34:43 -04:00
Arvid Norberg 7048eb1f5c be more conservative in marking packets as mtu-probes (#689) 2016-05-02 00:17:17 -04:00
arvidn e0e05e3961 fix asserts firing in unit tests 2016-04-28 21:59:41 -04:00
arvidn b8dad50757 fix whitespace 2016-04-28 17:14:41 -04:00
Alden Torres 96b7d3ad46 Removed unused alert_observer.hpp (#646) 2016-04-26 11:48:43 -04:00
Alden Torres d08bbbc0cc Added asserts related to total_size in create_torrent (#642) 2016-04-26 00:37:47 -04:00
Alden Torres 7c4fabadfd Removed unused statement (#643) 2016-04-24 23:47:57 -04:00
Arvid Norberg a9f07a29bd fix move_storage error handling bug (#638) 2016-04-23 10:02:52 -04:00
Alden Torres 6171c911a0 Added assert for total_size in create_torrent (#636) 2016-04-22 13:51:06 -04:00
Arvid Norberg 423ee1cef4 move some implementation details of bitfield into its own translation unit to not expose MMX and SSE internals (and fix shared linking) (#630) 2016-04-20 07:50:57 -04:00
Arvid Norberg 0b53fb70ad add missing torrent_error_alert::filename function (#629) 2016-04-20 00:46:42 -04:00
Alden Torres 0fddd403b2 Better api for peers() method in dht_get_peers_reply_alert (#628) 2016-04-19 16:16:51 -04:00
arvidn 93408a02ff fix classification of UDP packets as peer traffic 2016-04-18 01:29:46 -04:00
Alden Torres a73d424b82 typos 2016-04-15 15:39:41 -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 5d499e83b6 fix uTP/SSL 2016-04-09 10:50:45 -04:00
Arvid Norberg 774735b046 Merge pull request #600 from arvidn/python-warnings-1.1
fix some build warnings in python binding
2016-04-08 02:17:45 -04:00
arvidn 5c17dc9f31 fix some build warnings in python binding 2016-04-07 22:45:23 -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 876cef0d4c restore the ipv6 http tracker argument, but restricted to only private torrents 2016-04-07 00:06:04 -04:00
Arvid Norberg 6767cf96f1 Merge pull request #546 from arvidn/move-into-self-1.1
fail correctly when move_storage is called to move into itself 1.1
2016-04-06 17:49:05 -04:00
arvidn 387498e54f clean up in piece picker 2016-04-06 00:45:21 -04:00
Alden Torres bb8d1d0e56 Revert utp log file to disable by default
Documentation typos
2016-04-03 22:32:06 -04:00
arvidn dff0e7b0cd fix concurrency issue in part_file::export_file 2016-04-02 21:29:20 -04:00
arvidn 31805ecec0 fix some clang build warnings 2016-04-02 12:27:42 -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 7f232dd195 fix python3 issue in binding 2016-03-30 23:35:47 -04:00
arvidn 7649610807 fix test_optimistic_unchoking sim 2016-03-27 18:40:53 -04:00
arvidn 3e7a6b03e5 remove dead code in peer_connection 2016-03-21 18:47:17 -04:00
arvidn 0095aa084f make coalesce reads and coalesce writes actually work 2016-03-20 16:34:19 -04:00
arvidn a9d12766d4 fix typo in hard_link() 2016-03-20 16:14:29 -04:00
Arvid Norberg db214cc92d Merge pull request #559 from arvidn/direct-io-1.1
remove unused O_DIRECT mode
2016-03-20 14:42:58 -04:00
arvidn 139fb29647 remove unused O_DIRECT mode, and relax/simplify alignment requirements for coalesce_buffers 2016-03-20 00:55:31 -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
Arvid Norberg e9b334ce63 Merge pull request #494 from arvidn/udp-bind-failure-1.1
attempt to fix issue with binding udp sockets on windows
2016-03-19 13:20:51 -04:00
arvidn 53b5e964d2 fix merge issue and properly close ssl udp socket when disabled, prevents the extra listen_succeeded alert for the ssl udp socket 2016-03-19 10:25:35 -04:00
arvidn e9a5985609 if a udp socket is already bound to the IP and port we want to bind it to, don't reopen it 2016-03-19 10:25:30 -04:00
arvidn d705dc2953 attempt to fix issue with binding udp sockets on windows 2016-03-19 10:25:30 -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 c0033d0977 do not enable SSL listen sockets by default 2016-03-18 23:57:02 -04:00
arvidn b446fe4bba deprecate settings_pack::hashing_threads and replace it with aio_threads in documentation 2016-03-18 16:40:52 -04:00
arvidn 3c98868f6c deprecate explicit cache feature 2016-03-18 12:15:03 -04:00
arvidn 1cd5119178 remove/deprecate bad idea with mlock 2016-03-17 19:37:05 -04:00
arvidn 317eb2fe2a remove unused disk allocation code 2016-03-16 20:13:28 -04:00
Arvid Norberg a1d60db706 Merge pull request #547 from arvidn/no-read-cache-1.1
fix use_read_cache=false
2016-03-16 08:14:15 -04:00
arvidn 4926081960 fix use_read_cache=false 2016-03-16 02:22:18 -04:00
arvidn 36d0cfe40d fix shutdown issue caused by peer connections being kept alive by disk buffer pool callbacks 2016-03-16 00:28:19 -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
Steven Siloti 4331f57021 restrict check_cache_level to only runing on one thread at a time
If another thread trys to call check_cache_level then m_cache_check_state is set
to indicate that the thread currently in check_cache_level needs to call it again.
2016-03-14 19:03:12 -07:00
Steven Siloti d405535a3f try to free the piece after kicking the hasher and flushing 2016-03-14 19:03:12 -07:00
Steven Siloti e8f93df700 fix indentation 2016-03-14 19:03:12 -07:00
Steven Siloti 826bbe35ee always cache writes 2016-03-14 19:03:12 -07:00
Steven Siloti 6e8db41dd2 check_cache_level after performing a job rather than before
If dirty blocks are added while the job is running there is a chance of
deadlock if the dirty blocks cause the cache to exceed its size limit and
no further jobs come in to trigger another check.
2016-03-14 19:03:12 -07:00
Steven Siloti 9c5bb25d65 always clear outstanding_flush after attempting to flush a cached write
Also clear outstanding_flush before calling kick_hasher because kick_hasher
may unlock the cache mutex which can allow more dirty blocks to be added
which may require another flush_hashed job be added.
2016-03-14 19:03:12 -07:00
Arvid Norberg 82d177472e Merge pull request #541 from arvidn/fix-test-transfer-1.1
improve message from listen_failed_alert
2016-03-14 21:43:34 -04:00
arvidn c5861bcc04 fix failure to increment port when retrying socket binding 2016-03-14 18:52:43 -04:00
Arvid Norberg 42d423e992 Merge pull request #540 from arvidn/remove-purgable-control-1.1
remove the purgable control patch
2016-03-14 17:54:12 -04:00
arvidn 921cbeebed add option to delete just the partfile when removing a torrent 2016-03-14 08:26:39 -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
Arvid Norberg 035f8e98d1 Merge pull request #542 from arvidn/request-timeout-1.1
fix seed timing-out unchoked peers for not sending requests
2016-03-14 01:44:50 -04:00
arvidn 58e73c1469 fix typo 2016-03-13 20:47:50 -04:00
Arvid Norberg 5652a46068 Merge pull request #508 from arvidn/part-file-1.1
attempt to fix issue where the partfile is not deleted
2016-03-13 18:05:01 -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 fb85e5e60f improve message from listen_failed_alert. Post listen_failed_alert for every failure, including the ones that are re-tried 2016-03-13 16:18:44 -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 71e3fb8941 fix division by zero in super-seeding logic 2016-03-07 23:40:01 -05:00
arvidn f5d5ac4f3a fix bug where disk cache was wiped out after completion file-checking. factor out sim test utilities and reuse them in the regression test 2016-03-06 21:44:38 -05:00
Arvid Norberg 3fa3004b85 Merge pull request #526 from arvidn/rechecking-outstanding-1.1
always keep at least 2 async hash jobs outstanding
2016-03-06 20:05:56 -05:00
arvidn 442979c318 support filtering which parts of session state are loaded by load_state() 2016-03-06 16:35:49 -05:00
arvidn 67774d660d always keep at least 2 async hash jobs outstanding when rechecking torrents (to keep the bandwidth delay product full) 2016-03-06 16:31:18 -05:00
arvidn b40430f175 change the cache size calculation for auto cache size (-1) to be smaller, especially for machines with large amounts of RAM 2016-03-06 16:15:22 -05:00
arvidn a02c1d2164 record cache settings in the job instead of checking it twice for more robust behavior 2016-03-06 16:15:13 -05:00
arvidn 8ca76f9d59 fix support for auto disk cache size and disk buffer pool allocator behavior 2016-03-06 16:14:55 -05:00
arvidn 26f88bb12d add receive_buffer unit test and some more cleanup and asserts 2016-03-05 00:14:00 -05:00
arvidn 2efb9d9a6a fix bug in receive_buffer 2016-03-05 00:13:59 -05:00
Arvid Norberg be17b78c5f Merge pull request #522 from arvidn/io-thread-assert-1.1
remove invalid assert in the disk thread
2016-03-04 23:16:02 -05:00
arvidn 2bd6ad9974 remove invalid assert in the disk thread 2016-03-04 20:20:49 -05:00
Arvid Norberg 00f3406402 Merge pull request #514 from arvidn/allowed-unchoke-1.1
attempt to uphold the invariant that the num_unchoke_slots
2016-03-04 16:43:38 -05:00
arvidn b707a4de90 uphold the invariant that the num_unchoke_slots counter is int max as long as the unchoke slots limit < 0 2016-03-04 16:42:36 -05:00
Alden Torres 4998bfedc6 Documentation typos 2016-03-04 10:43:25 -05:00
arvidn b9ec183e24 increase default connect speed. minor cleanup. add logging for short lived connections 2016-03-03 01:20:15 -05:00
arvidn fbef47d3ec fix edge case in uTP stream when receiving a close-reason code 2016-03-02 22:30:02 -05:00
arvidn e851b79865 fix issue when shutting down a torrent with outstanding async operations 2016-03-02 01:16:08 -05:00
arvidn aeb9f1c5dd fix bug in enum_net_interfaces 2016-02-29 18:14:10 -05:00
arvidn 2b6fdc1728 attempt to fix issue where the partfile is not deleted when asking to delete all files 2016-02-28 16:05:13 -05:00
arvidn f563bf9cac attempt to make the alert type backwards compatible with cloning the state when building with deprecated functions enabled 2016-02-27 20:25:17 -05:00
arvidn ac2916c426 enable disk cache pool allocator by default. fix ansi escape code conversion in client_test on windows 2016-02-27 17:42:31 -05:00
arvidn 07ecf7c1bd remove invalid assert 2016-02-27 00:25:21 -05:00
Steven Siloti b52027a02a set enable_dht to true in session::start_dht(entry)
This function needs to enable the dht to match its semantics in pre 1.1 versions
2016-02-26 19:22:28 -08:00
Arvid Norberg 842d6fbca4 Merge pull request #492 from arvidn/fix-ssl-deprecated-1.1
fix build with openssl and deprecated functions disabled
2016-02-24 21:18:43 -05:00
arvidn d4f259ccf0 attempt to fix race when closing a web seed while it's receiving data 2016-02-24 02:23:09 -05:00
arvidn e5ccb63375 fix build with openssl and deprecated functions disabled 2016-02-24 02:07:27 -05:00
arvidn dcd6af6473 more fixing of test_transfer proxy tests 2016-02-24 00:03:56 -05:00