arvidn
3215deb2c5
make io_service::work accounting more accurate in asio-debugging=on
2017-06-14 07:01:06 -04:00
arvidn
9a19ff344b
remove resolve_links disk job left-overs and convert some C-arrays to std::array
2017-06-13 20:35:55 -04:00
Alden Torres
48ef3b6bf7
implemented support for BEP 51 ( #1652 )
2017-06-12 11:54:11 +02:00
arvidn
147d996160
make the job action enum an enum class
2017-06-11 23:53:58 +02:00
arvidn
f3d319b677
fix internal use of deprecated function identify_client
2017-06-10 08:16:23 +02:00
Andrei Kurushin
fc0cbfb789
fix bandwith rate limit calculation ( #2060 )
2017-06-08 12:50:55 +02:00
arvidn
4de9f6a75b
remove requester parameter to disk read jobs
2017-06-08 12:38:25 +02:00
Alden Torres
e38887cb3c
added add_torrent_params.cpp and moved is_nothrow asserts to cpp files ( #2059 )
2017-06-07 16:41:28 +02:00
Alden Torres
b1b3f0e3e8
one more fix related to typed_span conversion ( #2050 )
2017-06-02 06:42:03 +02:00
arvidn
6967d17a42
make move constructors and move assignment operators noexcept
2017-06-01 23:42:15 +02:00
pavel.pimenov
781a35a210
use operator+=(char)
2017-06-01 16:21:27 +02:00
Arvid Norberg
5344761da4
make flags to move_storage a proper enum class ( #2043 )
2017-06-01 04:15:15 -04:00
Alden Torres
c5cdd381da
fixed compilation warnings with newer versions of clang ( #2047 )
2017-06-01 04:12:02 -04:00
Pavel Pimenov
d0ff2200f9
torrent::remove_connection refactor ( #2046 )
2017-05-31 21:59:16 -04:00
Steven Siloti
67a530f3ab
only listen on preferred IPv6 addresses on Windows
...
We shouldn't listen on addresses which are duplicates, deprecated,
or tenative unless explicitly requested.
This is only supported on Windows for now because the Linux interface
to get this information is much less convenient for libtorrent to use.
As far as I've been able to determine, Linux only exposes this information
via the RTM_NEWADDR and RTM_GETADDR netlink messages. Currently libtorrent
uses getifaddrs() to enumerate network interfaces on Linux so this will
probably need to be changed to use netlink if available.
MacOS: ???
2017-05-30 07:38:12 -04:00
arvidn
afce0d3a86
make resolver_flags use enum class for improved type-safety
2017-05-29 18:38:59 -04:00
Pavel Pimenov
98a0344196
refactor traversal_algorithm look_for_nodes ( #1982 )
2017-05-29 12:20:52 -04:00
Steven Siloti
8e600c2201
peer_connection_handle::find_plugin should be const
2017-05-29 07:56:50 -04:00
arvidn
a9e5ef1521
merged RC_1_1 into master
2017-05-28 12:22:40 -04:00
arvidn
ffaabd846c
make file open mode flags be an enum class for type-safety
2017-05-28 11:16:59 -04:00
Steven Siloti
353ab20280
make session_handle hold a weak_ptr and be copyable ( #2034 )
2017-05-28 06:41:50 -04:00
Arvid Norberg
660cdaf2d1
deprecate direct access to array in session_stats_alert ( #2033 )
2017-05-27 20:33:31 -04:00
Pavel Pimenov
4cee8104d7
add base_mapping_t ( #2025 )
...
factor out parts of mapping struct from NATPMP and UPnP
2017-05-27 20:26:47 -04:00
Arvid Norberg
94701c24da
when stopping a torrent, never perform a name lookup on the tracker ( #2021 )
...
when stopping a torrent, never perform a name lookup on the tracker, only announce to trackers whose IP we already know. This is expected to make shutdowns not hang
2017-05-25 14:58:29 -04:00
Arvid Norberg
b60b3f164b
Merge pull request #2027 from arvidn/RC_1_1
...
merged RC_1_1 into master
2017-05-24 23:30:24 -04:00
Steven Siloti
40cfceb994
restore find_plugin API ( #2026 )
2017-05-24 23:29:21 -04:00
arvidn
432131e493
fix error reporting for enum_net_interfaces
2017-05-23 08:54:09 -04:00
arvidn
392f284566
remove some unused stats gathering state in disk_io_thread
2017-05-23 08:16:25 -04:00
arvidn
a985773f4b
fix previously faulty fix to enum_routes
2017-05-21 23:21:02 -04:00
arvidn
680ca6ea2b
merged RC_1_1 into master
2017-05-21 21:02:09 -04:00
Arvid Norberg
c7bb9f23ad
add debug mechanism to assert the connection list is not mutated while iterating over it ( #2016 )
2017-05-21 11:36:35 -04:00
arvidn
acd98d5c40
delay 5 seconds before reconnecting socks5 proxy for UDP ASSOCIATE
2017-05-21 08:53:29 -04:00
arvidn
604904c80c
merge RC_1_1 into master
2017-05-20 15:21:01 -04:00
arvidn
83735fdbb4
fix NAT-PMP crash when removing a mapping at the wrong time
2017-05-20 14:56:04 -04:00
Steven Siloti
22145d8cfa
don't assert when removing a link-local IPv6 interface
2017-05-20 06:10:06 -04:00
arvidn
e79a7a08b9
fix race condition in storage tick handling in disk_io_thread
2017-05-18 10:21:34 -04:00
Steven Siloti
d115c7e296
refactor endpoint search and log a failure to locate a matching socket
2017-05-17 01:34:35 -04:00
Steven Siloti
bc019f241b
keep iterating over endpoints if one is found to be done
...
Even if one endpoint is done others may be ready to announce so we need
to keep going.
Fixes #1992
2017-05-17 01:34:35 -04:00
Steven Siloti
893ef6479f
don't abort the existing torrent when attempting to add it again
2017-05-17 00:57:52 -04:00
arvidn
73a3e390b5
merge RC_1_1 into master
2017-05-15 09:12:23 -04:00
arvidn
56d5d795bf
improve path sanitization (filter unicode text direction characters)
2017-05-15 01:49:41 -04:00
Steven Siloti
4bc9515766
close listen sockets after closing all connections ( #1994 )
...
This fixes an assertion failure on shutdown if an IPv6 UTP socket tries
to send a FIN to a closed UDP socket. Because the closed socket reports
its local_endpoint() as udp::endpoint() it trips the protocol check in
send_udp_packet.
2017-05-14 20:16:47 -04:00
arvidn
9333c51da6
deprecate partial_piece_info::piece_state
2017-05-14 20:15:55 -04:00
arvidn
e870852c66
fix branch factor overflow in traversal algorithm
2017-05-13 08:10:21 -04:00
arvidn
e0fa1cd247
merged RC_1_1 into master
2017-05-12 21:46:45 -04:00
arvidn
ff63557f58
bind upnp requests to correct local address
2017-05-12 18:17:38 -04:00
arvidn
f8bda070be
don't combine reuseaddr and exclusive addruse on windows
2017-05-11 22:30:29 -04:00
arvidn
bfa455c5bd
save resume data when removing web seeds
2017-05-09 13:11:28 -04:00
Jan Berkel
b3815c5533
HTTP proxy: avoid connecting to itself ( #1978 )
2017-05-08 11:04:17 -04:00
arvidn
b1b4360df6
merged RC_1_1 into master
2017-05-08 07:48:42 -04:00
arvidn
14dbd1c92d
fix race condition in disk I/O storage class
2017-05-07 13:47:50 -04:00
Alden Torres
0b391d6351
avoid extra sha1_hash memory copy, minor formatting ( #1968 )
2017-05-04 17:35:40 -04:00
Pavel Pimenov
11c75da314
add trailing slash ( #1969 )
2017-05-04 17:35:00 -04:00
Jan Berkel
fe9f877087
Set connection timeout when next endpoint is tried ( #1952 )
2017-05-04 17:32:47 -04:00
arvidn
76ef0babed
remove deprecated file_base feature of file_storage
2017-05-04 12:03:31 -04:00
Pavel Pimenov
0ac16532ee
remove unique.count(url) ( #1964 )
2017-05-03 20:18:30 -04:00
Alden Torres
fd51c0b8bf
minor refactor in file_storeage and typos
2017-05-02 22:34:11 -04:00
arvidn
af495da56b
use std::function instead of the fileop interface for readwritev()
2017-05-02 08:07:29 -04:00
Arvid Norberg
1af17be046
use enum class for ssl bool in listen socket ( #1960 )
...
use enum class for ssl bool in listen socket. use std::array instead of C array. make test_listen_socket a bit more compact
2017-04-30 21:11:42 -04:00
arvidn
749d0da875
make iovec_t an alias for span<char>, in preparation for removing it altogether in favour of span
2017-04-30 11:49:08 -04:00
Steven Siloti
540e1046e7
remove deprecated udp functions
2017-04-30 08:11:56 -04:00
Steven Siloti
259559851c
fix indentation
2017-04-30 08:11:56 -04:00
Steven Siloti
fd50630020
announce to trackers for all listen interfaces
2017-04-30 08:11:56 -04:00
arvidn
23ba9d12d1
construct and destruct objects in stack allocations (alloca())
2017-04-28 21:34:31 -04:00
Alden Torres
4ea318faa0
compilation fix when not TORRENT_ASSERT
2017-04-26 13:46:35 -04:00
arvidn
a9a12e873f
make DHT bootstrapping more robust by not throwing away nodes
2017-04-25 23:03:52 -04:00
arvidn
4eb5155263
use span<> for peer_connection::send_buffer
2017-04-25 23:02:32 -04:00
Steven Siloti
761436dc97
add support for utp over multiple interfaces ( #1944 )
2017-04-25 23:00:41 -04:00
arvidn
1ea760ae93
fix iconv cast warnings
2017-04-24 08:02:11 -04:00
arvidn
e4dbd28920
need_save_resume_data() will no longer return true every 15 minutes. If clients want to save resume data regularly, they can call save_resume_data() with whatever interval they choose
2017-04-23 20:53:09 -04:00
Andrei Kurushin
027fa5e290
fix MSVC 14.1 warnings-as-errors=on build ( #1939 )
2017-04-23 20:52:37 -04:00
Steven Siloti
bcfaf9621a
fixes from review
2017-04-23 19:49:49 -04:00
Steven Siloti
cdd50be859
create a separate DHT node for each listen socket
2017-04-23 19:49:49 -04:00
Jan Berkel
afe1f685a4
Set next/min_announce to now
...
Prevents unnecessary tracker announce delays #1940
2017-04-23 16:00:53 -04:00
arvidn
7dd11268dd
removed use of boost::uintptr_t for better compatibility
2017-04-23 11:15:43 -04:00
Alden Torres
b863306c8b
minor code cleanup ( #1933 )
2017-04-22 21:33:38 -04:00
Alden Torres
735214a806
avoid connections to trackers when the event is stopped and stop_tracker_timeout <= 0 ( #1932 )
2017-04-22 18:33:26 -04:00
arvidn
b553cb32f7
fix storage destruction order issue
2017-04-22 17:30:31 -04:00
arvidn
04c76249b6
merged RC_1_1 into master
2017-04-21 01:21:31 -04:00
arvidn
227830e757
fix memory leak in the disk cache. if a cached_piece_entry would stick around in a ghost list (ARC), it would keep the torrent object itself alive. when aborting read jobs, the outstanding_read flag need to be cleared on the piece. When reclaiming a block for a piece that should be deleted (not just evicted) it need to know that. This patch adds an additional bit to cached_piece_entry to communicate this
2017-04-19 22:30:27 -04:00
arvidn
8eafd84273
merge send_message utility functions in bt_peer_connections into a template
2017-04-19 22:27:30 -04:00
Jan Berkel
cdf066c4e1
magnet links: unescape hash parameter ( #1925 )
2017-04-19 00:52:35 -04:00
Alden Torres
87592d50f2
minor typos and documentation changes in settings
2017-04-18 17:51:26 -04:00
arvidn
2d6268b580
fix double free in disk cache
2017-04-17 19:54:05 -04:00
Pavel Pimenov
9ebbcc2d69
add send_*_message ( #1922 )
...
factor out common message sending code in bt_peer_connection
2017-04-17 16:26:16 -04:00
arvidn
df299fcb00
use boost::variant for disk_io_job in/out parameter, to support holding a proper disk io buffer handle and string
2017-04-17 15:08:27 -04:00
Pavel Pimenov
7d09dba14e
add const ( #1917 )
2017-04-16 07:27:47 -04:00
Steven Siloti
969c0167d4
remove calls to RAND_add
...
This function has been removed from LibreSSL and offers dubious value.
The PRNGs in modern operating systems are robust enough that these little extra
bits arn't going to make a difference.
2017-04-15 22:00:29 -04:00
arvidn
cef9773c70
generalize part_file::export_file to pass back the buffers to a callback function
2017-04-15 20:01:18 -04:00
Steven Siloti
f86e207ba2
fix typo in natpmp::start
...
Calling update_mapping() on a mapping with protocol set to none is a no-op so
I'm pretty sure this check was meant to skip over such mappings.
2017-04-15 15:28:01 -04:00
arvidn
48e61b947a
remove mutex-release hack in file_pool
2017-04-14 12:45:18 -07:00
Alden Torres
ce23e0a82d
source code cleanup in ip_notifier
2017-04-12 16:11:53 -04:00
arvidn
480bde9333
change formatting of namespace declarations
2017-04-12 14:26:35 -04:00
Alden Torres
591d9716c3
refactored windows based ip_notifier in a separated class
2017-04-12 13:53:16 -04:00
Alden Torres
266beaaab2
refactored netlink based ip_notifier in a separated class
2017-04-12 09:50:18 -04:00
Alden Torres
81d669399b
added reachability based ip_change_notifier_impl for iOS ( #1902 )
...
added reachability based ip_change_notifier_impl for iOS
2017-04-11 23:53:13 -04:00
arvidn
79d7ae3638
separate path and filesystem functions out into its own translation unit/header file pair, separating it from the file and directory class
2017-04-11 18:07:55 -04:00
Alden Torres
a1df74a404
refactor/cleanup in ip_notifier code
2017-04-10 13:22:07 -04:00
Arvid Norberg
09274842f7
fix resume data issue in client_test and some warnings ( #1897 )
...
fix resume data issue in client_test and some warnings
2017-04-09 09:37:06 -04:00
Arvid Norberg
c35718d322
use unsigned integer for file and storage flags ( #1895 )
...
use unsigned integer for file and storage flags
2017-04-09 01:28:46 -04:00