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
arvidn
57aa813135
fix auto-managed issue with torrents transitioning to 'slow' as they get paused, returning to life again later because of it
2016-02-23 01:28:58 -05:00
arvidn
72a3771b87
attempt to fix logic around around actually closing udp sockets (specifically the SSL UDP socket)
2016-02-21 20:00:55 -05:00
arvidn
d8b88ba381
include protocol in portmap_alert
2016-02-21 19:16:00 -05:00
arvidn
61a67ece4a
fix non-openssl build
2016-02-21 18:40:06 -05:00
arvidn
cdfdbfd6aa
fix port mapping for SSL UDP socket
2016-02-21 17:40:27 -05:00
arvidn
13e9eb6680
forward-port outgoing interface fix from RC_1_0
2016-02-20 20:35:52 -05:00
Arvid Norberg
5d18800e04
Merge pull request #486 from arvidn/force-recheck-1.1
...
make force recheck a bit more robust
2016-02-20 19:53:56 -05:00
arvidn
3231aa4c9d
make force recheck a bit more robust by initializing the progress state immediately
2016-02-20 15:53:43 -05:00
arvidn
3f40890eb6
simplify logic for saving resume a bit
2016-02-20 15:45:46 -05:00
arvidn
5cf36fd1d6
only save pieces in resume data that have actually been checked
2016-02-20 00:48:17 -05:00
arvidn
828e79472d
forward port enum_net MTU fix
2016-02-11 00:46:28 -05:00
Arvid Norberg
7d8566f694
Merge pull request #473 from arvidn/bind-ssl-fix-1.1
...
fix issue in socket binding and back-port ssl test reliability fix
2016-02-10 19:47:34 -05:00
arvidn
ee14337894
revert listen_failed_alert::port
2016-02-10 18:28:34 -05:00
arvidn
ceb0ac6148
fix issue in socket binding and back-port ssl test reliability fix
2016-02-10 02:09:12 -05:00
arvidn
44abd1a59b
forward port fix to post torrent_added_alert earlier, from RC_1_0
2016-02-08 15:28:13 -05:00
arvidn
dd48faa8d4
minor debug logging issue in test facility wait-for-alert and fix minor shutdown issue with udp_socket packet subscription
2016-02-08 02:05:00 -05:00
Arvid Norberg
7b1a8ff6f1
Merge pull request #465 from arvidn/got-tracker-1.1
...
removed unused field in torrent
2016-02-07 14:50:08 -05:00
arvidn
f4627db97f
removed unused field in torrent
2016-02-07 02:37:32 -05:00
arvidn
f8a53d17ec
un-deprecate the endpoint field in listen_failed_alert
2016-02-07 02:12:58 -05:00
arvidn
df353bc3f9
forward port typo fix in udp_socket from RC_1_0
2016-02-06 15:49:25 -05:00
arvidn
74554de330
forward port GetAdaptersAddresses from RC_1_0 and fix error categories in enum_net.cpp
2016-02-05 01:08:09 -05:00
arvidn
b0cc0f84ab
support NULL being passed as the listen interface to session constructor
2016-02-02 23:17:51 -05:00
arvidn
0f747695b7
fix error handling bug in logging
2016-02-02 01:57:56 -05:00
arvidn
e3fc6083bb
fix typo in listen_failed_alert
2016-02-01 20:53:58 -05:00
arvidn
88b7e3768f
add sim test for optimistic unchoke round-robin distribution
2016-02-01 20:28:30 -05:00
arvidn
f2ce2284da
optimize the optimistic unchoke logic. extend the API for extensions to be able to affect the order of optimistic unchokes
2016-02-01 20:28:22 -05:00
Arvid Norberg
764c8a7f0c
Merge pull request #446 from arvidn/default-gateway-fix-1.1
...
forward port removal of special case for windows and mingw-1.1
2016-02-01 01:50:28 -05:00
arvidn
55024ccc4b
forward port removal of special case for windows and mingw in get_default_gateway that appeared wrong
2016-01-31 21:14:15 -05:00
arvidn
e113e8cdf3
minor cleanup of listen sockets
2016-01-31 19:40:31 -05:00
arvidn
e584c30b29
forward-port reuse address patch for windows
2016-01-31 18:16:26 -05:00
arvidn
acd929381e
restore the endpoint field in listen_failed_alert (but deprecated) and add a port field
2016-01-31 10:20:10 -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
f31d17c9c5
allow specifying which tracker to scrape in torrent_hadnle::scrape_tracker
2016-01-26 18:14:32 -05:00
arvidn
73289cb8ae
fix use of uninitialized variables in default_storage
2016-01-25 19:11:57 -05:00
Alden Torres
f71d775238
Allow xp compilation with the use GetFileInformationByHandleEx.
2016-01-25 12:22:33 -05:00
Steven Siloti
21feab838d
Enable SNI for outgoing SSL connections
...
Fixes #429
2016-01-24 12:24:33 -08:00
arvidn
2a0e64df46
add run-time check to file_storage::map_block and improve its documentation
2016-01-22 17:17:35 -05:00
Alden Torres
5c94b286b0
Removed file::m_path windows specific field
...
Removed default_storage::sparse_end
Typos
2016-01-21 12:11:33 -05:00
Alden Torres
218d33c545
Documentation typos and minor cleanup
2016-01-20 20:48:23 -05:00
arvidn
fbb246094b
fix windows build
2016-01-19 21:21:00 -05:00
arvidn
2fa84b3aa5
fix incorrect use of WaitForMultipleObjects
2016-01-19 18:47:21 -05:00
arvidn
784f8806a4
fix asio debugging feature
2016-01-18 23:13:50 -05:00
arvidn
595fe157a9
fix shutdown issue
2016-01-18 20:48:27 -05:00
arvidn
4cbbb0620e
only strip trailing dots and spaces from filenames on windows
2016-01-18 13:07:04 -05:00
arvidn
1f9f588e75
merge copyright year update and changelog from RC_1_0
2016-01-17 18:57:46 -05:00
Arvid Norberg
fa391d4961
Merge pull request #394 from arvidn/forward-port-http-fix
...
forward port fix for web seeds not being used by torrents added by URL
2016-01-17 17:47:25 -05:00
arvidn
0c971d0d62
forward port fix for web seeds not being used by torrents added by URL
2016-01-16 23:57:33 -05:00
arvidn
3cd57b59e0
when a tracker is force announced or scraped by the user/client, the resulting response or failure alert is now posted regardless of the alert mask. Since it's user initiated, it's reasonable to expect the user to be interested in the response
2016-01-16 21:24:04 -05:00
arvidn
78d306157b
forward port of windows symlink fix from RC_1_0
2016-01-16 01:53:27 -05:00
Arvid Norberg
cdc3e720d6
Merge pull request #386 from arvidn/win-file-error-handling
...
fix missing error handling in windows preadv/pwritev emulation
2016-01-13 21:50:49 -05:00
arvidn
c8f119c1a1
fix typo
2016-01-13 01:07:27 -05:00
arvidn
4a28e95ce0
fix missing error handling in windows preadv/pwritev emulation
2016-01-13 00:49:17 -05:00
arvidn
13f03ce38a
print the actual stats in session_stats_alert::message() and make parse_session_stats.py parse the alert output. add stats_metric objects for all performance counters
2016-01-12 23:34:37 -05:00
arvidn
f4d643bd2d
instead of restarting the whole DHT when changing external IP, just rebuild the routing table and change the node IDs
2016-01-11 21:17:25 -05:00
Alden Torres
20d8f4e3f7
Removed unused fields in field class
2016-01-11 12:07:36 -05:00
arvidn
4cc2e879c4
comment out verbose pex logging. fix bug in disabled_storage and an error reporting issue on short reads in default_storage
2016-01-10 11:50:56 -05:00
Alden Torres
0f442f59f3
Avoid pass IPv6 address to current implementation of DHT while adding a node
2016-01-09 18:46:19 -05:00
arvidn
e06daa68a4
overhaul the dht simulator (setup_dht) to be more flexible and cheaper to run thousands of nodes
2016-01-09 01:08:52 -05:00
Alden Torres
7b34379c87
Doc typos
2016-01-05 08:31:04 -05:00
Arvid Norberg
7282195ef0
Merge pull request #355 from arvidn/dht-add-node
...
simplify dht routing table add
2016-01-03 09:54:30 -05:00
arvidn
d954ae1b18
simplify dht routing table add
2016-01-02 20:03:18 -05:00
Alden Torres
b9a5525ab2
Store dht_settings::max_peers in session state
2016-01-02 11:49:07 -05:00
arvidn
07ddb010c5
split buckets when exceeding the next bucket's size, to make sure we split before risking discarding nodes because the next bucket is smaller
2016-01-02 00:45:44 -05:00
arvidn
e3ba811ae4
improve name of m_timer in dht_tracker
2016-01-01 16:42:44 -05:00
arvidn
01e6b93854
simplify and improve unit test for distance_exp. make some immutable variables const in the DHT implementation. instead of waking up periodically just to check if it's time to refresh the DHT secret key, set the timer to only wake up to refresh the key. If we don't have a DHT observer (to ask for our external IP) or if we don't know our external IP, don't generate a node ID based on 0.0.0.0, just generate a random ID instead. Simplified and improved node replacement logic in the routing table a little bit
2016-01-01 16:42:37 -05:00
Arvid Norberg
ffb78f0378
Merge pull request #312 from ssiloti/export-verify-message
...
export verify_message and incoming_error
2015-12-30 22:51:38 -05:00
Steven Siloti
ac01ccc43a
add templated wrapper around verify_message
...
It was too easy to forget to update the ret and size parameters
when the size of desec changed. With this change we now automatically
get the size of desc and enforce that ret has the same size.
It would be nice if we could use bdecode_node ret[static Size] from C99
but that is not widely supported.
2015-12-29 20:35:36 -08:00
arvidn
1698dc75dc
remove redundant boost::bind
2015-12-25 15:59:50 -05:00
Arvid Norberg
03e90d45d8
Merge pull request #339 from arvidn/dht-storage-test
...
extend the unit test of dht_storage
2015-12-20 02:02:56 -05:00
arvidn
626baade75
fix dht_storage bug
2015-12-19 22:06:25 -05:00
arvidn
3460f203f3
extend testing of sanitize_append_path_element
2015-12-19 20:11:22 -05:00
arvidn
28749466a2
fix build
2015-12-19 02:40:10 -05:00
arvidn
15ec839d33
extend the unit test of dht_storage
2015-12-19 02:09:06 -05:00
arvidn
e9b98c7d2e
GetFileAttributesEx fix
2015-12-19 00:12:11 -05:00
arvidn
1f3f06a836
forward port fix for deleting files of magnet link to master
2015-12-18 18:33:31 -05:00
arvidn
645b121df6
deprecate resolve-countries
2015-12-14 21:32:30 -05:00
Arvid Norberg
87dcd690d8
Merge pull request #327 from arvidn/stop-when-ready-fix
...
polish the stop-when-ready flag and improve documentation
2015-12-14 00:42:57 -05:00
Arvid Norberg
3516e53fa2
Merge pull request #329 from arvidn/warnings-fix
...
mark up some override functions and fix other clang warnings
2015-12-13 22:12:52 -05:00
arvidn
1712a8e4b4
polish the stop-when-ready flag and improve documentation
2015-12-13 20:31:28 -05:00