Arvid Norberg
b3856d3027
narrow the scope affected by TORRENT_DISABLE_EXTENSIONS to only disable the user extensions, but always support the extension message and the built-in extensions, like lt_donthave and seed_mode
2018-07-26 09:31:49 +02:00
Arvid Norberg
4282dd072a
factor out generate_peer_id into its own file
2018-07-25 08:49:18 +02:00
arvidn
a1f2995716
add piece index range checks on have_piece() and read_piece()
2018-07-25 00:20:18 +02:00
arvidn
730ef15b08
minor cleanups
2018-07-24 16:34:46 +02:00
Arvid Norberg
828c5dd097
merged RC_1_1 into master
2018-07-19 14:37:22 +02:00
Arvid Norberg
5bb5ba145f
fix exporting files from partfile while seeding
2018-07-18 10:56:24 +02:00
arvidn
4aa3c4573a
use the strong type for pause flags
2018-07-16 12:06:21 +02:00
arvidn
4633258fbe
make the DHT announce flags a strong type
2018-07-16 12:04:16 +02:00
Steven Siloti
76ef8b9d72
simplify SSL torrent announce flags logic
2018-07-12 08:36:57 +02:00
Steven Siloti
28b6f64c4b
dht: don't set implied_port for SSL torrents
2018-07-12 08:36:57 +02:00
Steven Siloti
961cf62cad
dht: announce with per-interface listen port
2018-07-12 08:36:57 +02:00
Arvid Norberg
e317c72db3
merged RC_1_1 into master
2018-07-08 18:52:13 +02:00
arvidn
b750b6cc2c
deprecate (and disable) the force-proxy setting. Instead, always use the proxy when set, never fall back on circumventing it
2018-07-08 18:26:47 +02:00
arvidn
2ba0e5ae2c
move the file priority vector throught the disk_io_job, to avoid copies
2018-07-08 18:25:06 +02:00
arvidn
d2d35b69fd
raise priority of cache_flushed_alert and post it unconditionally when triggered explicily by the client
2018-07-08 18:23:44 +02:00
arvidn
e45df614fe
improve type safety of internal leave_seed_mode() function
2018-07-08 17:32:50 +02:00
Alden Torres
6d2f804d9f
code refactor related to the use of index_range and end index
2018-07-08 17:32:30 +02:00
Arvid Norberg
b60912569f
back-port resume data validation fixes
2018-07-08 17:31:29 +02:00
Arvid Norberg
3fede4b223
merged RC_1_1 into master
2018-07-08 11:55:32 +02:00
arvidn
b5cd959dd1
bump the minimum number of hash jobs per thread from 2 to 4
2018-07-07 18:02:24 +02:00
Arvid Norberg
c7e705e158
merged RC_1_1 into master
2018-07-07 13:33:15 +02:00
arvidn
3249b70cbd
fix recent patch to support setting file priorities on torrents that don't have metadata yet
2018-07-07 11:34:11 +02:00
d-komarov
6d5a6f05ad
Fix torrent files prioritization ( #3133 )
...
After setting file priority, any subsequent attempt to set different priorities will fail if there is a `file_priority` job running in in disk thread. This happens because `torrent::m_file_priority` is being updated before adding disk thread job. The problem is gone if the file priority vector owned by the torrent object, is modified in the `torrent::on_file_priority` callback, when disk job finishes.
2018-07-04 08:16:33 +02:00
arvidn
2cb29f88ac
merged RC_1_1 into master
2018-06-23 23:22:26 +02:00
Steven Siloti
b7f230316c
set the minimum number of checking jobs based on the number of hasher threads
...
To effectively mask the latency of generating more hash jobs there need to be
at least two jobs in-flight for each hasher thread.
2018-06-23 23:10:55 +02:00
arvidn
5530793c75
improve the API for iterating over all files and pieces, with the new strong index types.
2018-06-12 11:44:29 +02:00
arvidn
267ca40b28
merged RC_1_1 into master
2018-06-02 13:15:13 +02:00
arvidn
c55bc7dd42
improve error handling of failing to change file priority
2018-05-31 00:47:17 +02:00
Alden Torres
6c4869f044
moved instantiate_connection to aux namespace
2018-05-29 09:25:25 +02:00
arvidn
1a66a8b285
merged RC_1_1 into master
2018-05-20 12:08:46 +02:00
arvidn
c986d93913
fix properly ignoring failure to get local endpoint of a socket while printing an error
2018-05-20 10:47:46 +02:00
Steven Siloti
54f00ce09d
don't change state to downloading if the torrent is finished
...
Move the transition to downloading after the torrent has been checked
for being finished. This prevents a spurious state_changed_alert when
adding a torrent which is already completed.
Also move the posting of the torrent_checked_alert to maintain the
historical ordering of that alert with respect to the transition out of
checking_resume_data.
2018-05-20 08:45:24 +02:00
Alden Torres
7621be6df1
fixed signed/unsigned warnings with latest version of Xcode clang ( #3032 )
2018-05-16 16:06:33 +02:00
Alden Torres
a14d595eac
minor code cleanup in torrent.cpp
2018-05-16 16:05:15 +02:00
Arvid Norberg
f4d7ff592e
merged RC_1_1 into master
2018-05-14 09:50:10 +02:00
Steven Siloti
243353a144
account for partially downloaded pieces when announcing as a seed
2018-05-13 22:35:04 +02:00
arvidn
fe612ca167
replace the TORRENT_CFG ABI check with inline namespaces around the symbol that can change ABI based on build configuration options
2018-05-13 19:25:17 +02:00
arvidn
ddd1168296
don't attempt to make uTP connections if we don't have any outgoing UDP sockets
2018-05-12 13:34:58 +02:00
Steven Siloti
8fdba2aa39
don't specialize standard type trait is_integral
...
Concerning type traits, the C++ standard states: "The behavior of a program
that adds specializations for any of the templates defined in this subclause is
undefined unless otherwise specified."
There is no exception for is_integral.
2018-05-10 19:06:18 +02:00
Alden Torres
377e800e72
fixed conversion warnings in 32 bits
2018-04-30 23:09:00 +02:00
arvidn
8621477239
merged RC_1_1 into master
2018-04-28 14:36:24 +02:00
Arvid Norberg
b4d2281e53
honor torrent abort even on file check error
2018-04-24 23:14:48 -04:00
arvidn
3ede0b9c20
fix last_upload, last_download and last_scrape to be reported accurately and saved/restored in resume data
2018-04-22 06:14:22 -04:00
Alden Torres
791a1e8557
minor code refactor and a few const in torrent.cpp
2018-04-13 14:17:02 +02:00
arvidn
f0227451a6
merged RC_1_1 into master
2018-04-13 01:47:41 +02:00
arvidn
aaf9304a3b
update year in copyright header
2018-04-09 09:04:33 +02:00
Fernando Rodriguez
9d83da110b
Delay hash_failed_alert until on_piece_sync()
...
Delay the hash_failed_alert until after synchronizing with the IO thread
so that it can be used to synchronize piece progress.
2018-04-07 15:59:40 +02:00
Alden Torres
5b922072e9
avoid calls to .address() when looking for endpoint protocol ( #2892 )
...
using is_v4 and is_v6 where possible
2018-04-01 13:48:17 +02:00
arvidn
d080c6f532
merged RC_1_1 into master
2018-03-26 12:56:25 +02:00
d_komarov
1c867a5026
Changing file priorities while checking interrupts checking.
...
Also, if the last file has zero priority, checking is interrupted prematurely.
2018-03-26 02:59:10 +02:00
arvidn
0fa24faec4
merged RC_1_1 into master
2018-03-25 22:06:41 +02:00
arvidn
02a01fa22e
fix issue where the current tracker would be skipped for the next tracker in the same tier
2018-03-25 14:40:38 +02:00
arvidn
3171245292
fix warnings
2018-03-24 23:01:19 +01:00
arvidn
82f87b0655
remove redundant check in tracker announce. This is checked in http_tracker_connection
2018-03-21 23:38:10 +01:00
arvidn
8658fb5f7c
deprecate the error_file_* constants whose underlying features have been deprecated
2018-03-13 19:39:55 +01:00
arvidn
5c1b65e9b8
merged RC_1_1 into master
2018-03-12 02:32:12 +01:00
arvidn
a06e4f696b
track whether a file is eligible for using the partfile on a per-file basis. This is intended to improve backwards compatibility, to better support resuming files downloaded with older versions of libtorrent
2018-03-11 12:52:56 +01:00
arvidn
05f7a95604
fix reporting &redundant= in tracker announces
2018-03-08 02:11:46 +01:00
arvidn
f8fb5c2294
merged RC_1_1 into master
2018-02-10 22:52:12 +01:00
arvidn
77181c1469
fix issue when receiving a torrent with 0-sized padfiles as magnet link
2018-02-09 17:41:30 +01:00
Alden Torres
d2e874fca8
headers code cleanup, removed unused fields in torrent class ( #2775 )
2018-02-06 08:32:19 +01:00
arvidn
15a8a17a6f
merged RC_1_1 into master
2018-02-05 08:55:15 +01:00
arvidn
01c41fadcf
fix torrent_status::next_announce
2018-01-29 15:08:18 +01:00
arvidn
50a293730b
merged RC_1_1 into master
2018-01-29 10:20:45 +01:00
arvidn
e126d7bce0
move socket_type into aux-namespace
2018-01-29 08:33:45 +01:00
arvidn
9ac394f5b0
turn piece picker option flags into a proper type
2018-01-29 03:01:17 +01:00
arvidn
a33c81ad33
shave down session_interface by one function, reduce the dependencies between torrent and session
2018-01-29 03:00:59 +01:00
arvidn
ca3ea591df
fix pad-file scalability issue
2018-01-29 03:00:37 +01:00
arvidn
a50579c651
merged RC_1_1 into master
2018-01-27 09:41:54 +01:00
d-komarov
fa03cbea9b
Revise torrent state update
...
* Remove unused m_in_state_updates
* Update m_state_subscription comments
2018-01-27 09:17:40 +01:00
arvidn
4fef787212
merged RC_1_1 into master
2018-01-24 00:37:05 +01:00
arvidn
efd096d879
use unique peer_ids per connection
2018-01-23 16:40:16 +01:00
arvidn
65fef972a2
apply some c++11 modernization
2018-01-11 04:51:39 -05:00
pavel.pimenov
263e01f5da
fix rp->blocks_left = blocks_in_piece;
2018-01-11 02:44:37 -05:00
pavel.pimenov
3f23ef59c6
small opt torrent::add_piece
2018-01-09 03:20:07 -05:00
arvidn
3a9861e237
complete the error handling test and make it part of the default simulation test suite. It will run a file transfer between two clients repeatedly, each time cause another memory allocation fail, until every single memory allocation has failed once. Any invariant check failure, assertion or signal will cause the test to fail
2018-01-08 04:44:52 -05:00
Alden Torres
98ade28237
using make_address instead of deprecated from_string when boost>=1.66 ( #2659 )
...
using make_address instead of deprecated from_string when boost>=1.66
2018-01-04 04:48:22 -05:00
arvidn
0731200149
block_size is a constant, no need in passing it around as a variable
2018-01-03 08:45:25 -05:00
arvidn
6047e42c16
fix torrent invariant when creating the piece picker fails
2017-12-28 21:02:50 +01:00
arvidn
8b3624b25b
remove_peer() and attach_peer() error handling
2017-12-28 14:26:19 +01:00
arvidn
aae12250ae
support forced shutdown/destruction of torrent objects
2017-12-28 14:11:55 +01:00
arvidn
5f0c9a0c1d
improve error handling during session shutdown
2017-12-28 13:52:07 +01:00
arvidn
6ba64a1bb3
reserve space for m_peers_to_disconnect up front, in order to make queing up a peer for disconnection noexcept
2017-12-27 21:22:08 +01:00
arvidn
347555ea8f
handle errors in peer_connection
2017-12-26 10:39:54 +01:00
arvidn
a54f76d5df
deprecate status_code from tracker_error_alert (it's already part of the error_code), simplify code a bit
2017-12-19 00:55:51 +01:00
arvidn
d45de18ba7
merged RC_1_1 into master
2017-12-18 23:01:33 +01:00
arvidn
178281e1c5
make torrent_handler::set_priority() to use peer_classes
2017-12-18 00:56:44 +01:00
arvidn
87de08cb3d
improve type safety of plugin interface
2017-12-17 23:55:12 +01:00
arvidn
bb945f5cf4
introduce a proper type for pex flags to improve type-safety
2017-12-17 23:17:12 +01:00
arvidn
d52763805c
back-port the tracker timeout test from master
2017-12-16 13:54:15 +01:00
arvidn
55babc57e6
merged RC_1_1 into master
2017-12-15 17:18:27 +01:00
arvidn
d1a63cd781
fix build against boost-1.66, specifically the boost.asio changes
2017-12-15 11:29:53 +01:00
Steven Siloti
9e0a3aead1
use info hash from params instead of passing it separately
2017-12-14 10:18:33 +01:00
arvidn
b00b3184c0
some minor i2p cleanups
2017-12-08 09:57:21 +01:00
arvidn
90ccd5180f
merged RC_1_1 into master
2017-12-07 18:31:16 +01:00
arvidn
f81a20a035
fix loading resume data when in seed mode
2017-12-03 23:43:55 +01:00
Alden Torres
ee1f4aa129
more use of auto, const and minor refactor in torrent.cpp ( #2554 )
2017-11-25 01:22:52 +01:00
arvidn
57ec82cb2e
fix indentation in torrent.cpp
2017-11-24 22:15:30 +01:00
arvidn
4bc93cff38
merge RC_1_1 into master
2017-11-23 18:01:32 +01:00
arvidn
5e7666526e
fix IPv6 tracker announce issue
2017-11-23 10:11:59 +01:00