arvidn
4b467f82ac
fix issue with initializing settings on session construction
2017-12-02 12:20:36 +01:00
arvidn
5ce798197c
merged RC_1_1 into master
2017-12-02 11:39:23 +01:00
Alden Torres
163d13e1d2
implemented support magnet URI extension, select specific file indices for download, BEP53 ( #2578 )
2017-12-01 12:40:19 +01:00
Alden Torres
28f096e94e
added const to static arrays, minor refactor in alert.cpp
2017-12-01 09:57:00 +01:00
arvidn
f42b63c7ea
update io_service forward declaration to be boost-1.66 compatible
2017-11-29 17:58:20 +01:00
arvidn
a6656aeb93
generate random keys for use in tracker announces. keys are unique for each torrent and the listen interface they announce via
2017-11-29 00:10:35 +01:00
arvidn
0da2d4dca3
make sure libtorrent_assert_log is exported, when production asserts are enabled
2017-11-28 09:46:18 +01:00
Alden Torres
f2681412e7
more use of const in peer_connection.cpp and minor code refactor
2017-11-28 09:45:40 +01:00
arvidn
18176ae5b3
include peer_class_type_filter in the generated reference documentation
2017-11-24 23:40:51 +01:00
arvidn
4e452c7bb6
improve peer class documentation
2017-11-24 15:33:52 +01:00
arvidn
addc52706e
fix typo
2017-11-23 20:53:54 +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
Alden Torres
c97bd53cde
more use of const, emplace_back and minor code refactor
2017-11-20 23:45:41 +01:00
Arvid Norberg
c734f42ac3
make tracker announces happen even if there are no open listen sockets ( #2529 )
...
support announcing to IPv6 trackers and running an IPv6 DHT when not listening for incoming connections
2017-11-20 23:42:22 +01:00
arvidn
30a7b52855
use a proper optional value instead of a sentiel value for bytes_left()
2017-11-19 21:25:06 +01:00
arvidn
f262bbdcea
use seconds32 as the retry-time for web seeds
2017-11-19 16:20:36 +01:00
arvidn
237856f7f1
more fixes of unwanted macro expansions of min/max in headers (windows.h compatibility)
2017-11-13 15:36:42 +01:00
arvidn
521587c026
make sure the cork destructor doesn't leak exceptions
2017-11-12 23:03:54 +01:00
arvidn
0378ae47f4
fix some macro expansions of 'max' in headers, to improve compatibility with windows.h
2017-11-12 23:01:47 +01:00
arvidn
b6a73eeaaa
simplify trigger_unchoke and trigger_optimistic_unchoke on session_impl, abd make them noexcept
2017-11-12 15:48:46 +01:00
arvidn
94dcd8e14b
remove unused transaction id member of DHT observers
2017-11-12 15:46:33 +01:00
arvidn
1c278cc697
add API to query whether alerts have been dropped or not
2017-11-11 15:42:53 +01:00
arvidn
254f813626
factor out handler allocator and reuse it for posting deferred peer removals on torrents
2017-11-11 10:41:39 +01:00
arvidn
b88c193742
fix sign conversion warning in peer_class_type_filter
2017-11-11 09:17:37 +01:00
Pavel Pimenov
8ac6bbe553
add http_parser::header_int ( #2472 )
2017-11-09 23:43:26 +01:00
arvidn
fc74c032f0
minor cleanup and modernization of torrent_peer
2017-11-09 15:48:27 +01:00
arvidn
f41d2b5d3b
move shared_ptr instead of copying them, when constructing DHT observers
2017-11-08 23:09:43 +01:00
arvidn
7730eea401
restore backwards compatibility with the API before download_priority_t was introduced
2017-11-06 01:24:24 +01:00
arvidn
a690e6c76d
add throwing overload of parse_magnet_uri
2017-11-05 20:31:06 +01:00
arvidn
6785046c2f
introduce a download_priority_t type, for uniform an type-safe piece- and file priorities
2017-11-02 08:20:21 +01:00
arvidn
f57b90b500
introduce type for torrent queue_position
2017-11-01 10:52:45 +01:00
Alden Torres
5480c08184
enable/disable the internal ip notifier with new setting ( #2487 )
2017-11-01 10:51:51 +01:00
Johan Gunnarsson
03b3d24ccf
Install kademlia/dht_settings.hpp with Automake
2017-10-29 02:48:36 +02:00
Alden Torres
f040d6d860
added reopen_network_sockets method to allow manual reopen of listen/outgoing sockets ( #2476 )
2017-10-28 12:15:35 +02:00
arvidn
50bef25786
make the piece-picker less two-phase initialized
2017-10-26 23:39:15 +02:00
Alden Torres
ab4f140328
using NETLINK_NO_ENOBUFS to ignore ENOBUFS in netlink based ip notifier ( #2475 )
2017-10-26 11:15:19 +02:00
arvidn
80ac90727b
remove some questionable code from disk_io_thread when deleting files for a torrent and extend transfer test to cover deleting files while seeding
2017-10-25 19:00:54 +02:00
arvidn
9e69bf3618
introduce a type to refer to a torrent-list-index, to improve type safety
2017-10-25 13:39:37 +02:00
Alden Torres
b380bf8059
minor and general code cleanup/refactor
2017-10-25 09:58:47 +02:00
Alden Torres
6409cb42e1
fix implicit-fallthrough warnings with gcc 7
2017-10-23 19:18:33 +02:00
Alden Torres
bb409c5ee9
missing return if error in session_impl::on_port_mapping, doc typo ( #2459 )
2017-10-23 12:36:51 +02:00
arvidn
98effc8d88
minor disk_io_job piece_hash cleanup
2017-10-22 16:49:25 +02:00
Alden Torres
8083a6c2bd
some code indentation, one more use of nullptr and constexpr
2017-10-15 04:30:10 +02:00
arvidn
a6c85496b5
make parse_magnet_uri return the add_torrent_params instead of of taking an in-out parameter
2017-10-15 04:29:53 +02:00
Alden Torres
762ae9aec4
pick standard std::aligned_union if using clang ( #2447 )
2017-10-15 04:29:33 +02:00
arvidn
516df740a3
make session_handle::get_torrent_status return the vector instead of taking an out-parameter
2017-10-14 23:35:35 +02:00
arvidn
bb65acb082
make feature_flags proper type-safe
2017-10-14 23:33:48 +02:00
arvidn
f0bac4cac7
merged RC_1_1 into master
2017-10-14 15:22:22 +02:00
arvidn
6214103619
fix documentation typo
2017-10-14 13:54:43 +02:00
arvidn
8adcfdbf41
make disk_buffer_holder know the size of the bufer it holds, to fix buffer overrun in chained_buffer
...
fix
2017-10-13 21:07:31 +02:00
arvidn
4556fe5566
fix outdated comment
2017-10-13 16:27:21 +02:00
arvidn
8af89da689
fix GCC-4.9 build
2017-10-13 10:08:51 +02:00
arvidn
9111d5977e
make the variables holding the source of external IPs type-safe
2017-10-10 22:38:36 +02:00
Arvid Norberg
60b74d2616
merged RC_1_1 into master
2017-10-10 14:25:12 +02:00
Arvid Norberg
830ef0bedd
prevent dependency on openssl from leaking outside of libtorrent (libssl and libcrypto should not be a usage requirement). This cleans up most tests to build without having to also link against openssl
2017-10-09 17:15:35 +02:00
Arvid Norberg
aec9a4940c
fix peer_list constructor
2017-10-08 22:06:43 +02:00
arvidn
1d15e6bfb4
merge RC_1_1 into master
2017-10-08 18:21:25 +02:00
arvidn
cdd9f91999
fix leak of torrent_peer objecs (entries in peer_list)
2017-10-07 11:43:42 +02:00
arvidn
d0f55224fb
simplify copy_ptr
2017-10-07 02:59:46 +02:00
Alden Torres
e47f73ee3b
cleanup of field torrent_need_cert_alert::error ( #2414 )
...
deprecate field torrent_need_cert_alert::error
2017-10-06 10:54:33 +02:00
arvidn
ed31664ee3
deduce the second argument to iconv() instead of requiring it to be configured via a macro
2017-10-06 10:52:09 +02:00
Matthew Fioravante
170c2a6984
Fixes to copy_ptr
...
* Add move constructor
* Add move assignment
* Fix exception safety bug in copy assignment
2017-10-05 11:44:27 +02:00
arvidn
69dc73914a
merged RC_1_1 into master
2017-10-04 11:43:01 +02:00
Tim Niederhausen
7f033fa04b
Fix malloc result size detection on FreeBSD
...
Instead of <malloc/malloc.h> and malloc_size FreeBSD has <malloc_np.h> and
malloc_usable_size.
see: https://www.freebsd.org/cgi/man.cgi?query=malloc_usable_size&manpath=FreeBSD+11.1-RELEASE+and+Ports
2017-10-04 08:56:55 +02:00
arvidn
5f3661aaa2
back port overflow checking from master
2017-10-02 00:02:14 +02:00
arvidn
5026659cb6
clean up and fix edge cases in update_path_index
2017-10-01 04:43:41 +02:00
arvidn
68f05d6380
fix some warnings and integer overflow with torrents that are too big
2017-09-28 14:59:28 -07:00
arvidn
c66f4cc62a
fix some warnings, mostly 0 -> nullptr
2017-09-28 07:33:10 -07:00
Alden Torres
53ab7684fd
minor code refactor and cleanup in port mapping code
2017-09-28 01:17:21 -07:00
arvidn
d0067eafe0
fix typo
2017-09-26 09:21:30 -07:00
arvidn
9cad0d8cf2
expose peer class API in python binding
2017-09-24 23:25:20 -07:00
arvidn
edad33d270
fix const correctness in get_peer_class
2017-09-24 14:49:55 -07:00
arvidn
4c4c630fae
merge RC_1_1 into master
2017-09-23 10:46:29 -07:00
arvidn
d22c44c057
fix kludge and down-cast to send upload_only. Promote upload-only to a top-level peer feature
2017-09-23 07:51:51 -07:00
Alden Torres
1d9b10a32b
fix warning for Xcode 9, added const and minor code refactor to bt_peer_connection.cpp
2017-09-22 04:46:16 -07:00
Steven Siloti
8648de3706
DHT nodes should only handle requests on their socket ( #2355 )
2017-09-21 21:00:38 -07:00
arvidn
7f4566c694
improve share_ratio_limit documentation
2017-09-21 13:05:23 -07:00
arvidn
fc4588ad3b
bump priority of storage_moved_alert and storage_moved_failed_alert
2017-09-21 05:43:18 +02:00
arvidn
6b55096ebd
switch some using declarations to new-style typedefs. remove some redundant parenthesis
2017-09-18 09:38:51 +02:00
arvidn
7717c02c2f
run sonarqube with deprecated functions disabled. fix some of its code smells
2017-09-17 18:06:53 +02:00
Steven Siloti
0232dc35cd
deprecate lock_files ( #2344 )
...
File locking interacts poorly with the path to replace a read only file handle
with a read/write one. For performance reasons the old handle is not closed
until the new one is put in place. With file locking this obviously cannot
work because the first handle is holding a lock on the file. As a result,
file_pool::open_file fails in this case. Even if we dropped the reference to
the read only file handle before attempting to re-open it, the open could still
fail if another thread is holding a reference to the read only handle.
There doesn't seem to be a good way around this. The simple solution would be
to always open files in read/write mode, but that has obvious safety downsides.
Any other solution would significantly complicate the file pool code.
Deprecating file locking seems to be the least bad option.
2017-09-17 10:43:27 +02:00
arvidn
240b5f73b1
merged RC_1_1 into master
2017-09-16 21:07:29 +02:00
arvidn
1a8660bca7
don't shadow static_category in alerts
2017-09-16 19:58:11 +02:00
arvidn
1ddc710be1
fix uTP path MTU discovery issue on windows (DF bit was not set correctly)
2017-09-16 19:56:42 +02:00
arvidn
8d6b51d54c
minor cleanups
2017-09-16 13:48:11 +02:00
arvidn
17d5d34272
fix documemtation of storage_moved_alert
2017-09-16 12:35:35 +02:00
arvidn
93bb84d94c
some random cleanup
2017-09-13 08:28:46 +02:00
arvidn
ccbd6cbcfe
remove rss_reader.py, since rss has been reprecated. fix python binding for torrent_handle, to be hashable. update client_test.py to not use deprecated APIs and follow best (libtorrent) practice
2017-09-11 22:28:57 +02:00
arvidn
735f6fd1f4
remove redundant virtual specificers when override is present
2017-09-10 19:28:18 +02:00
Steven Siloti
df8a57efb7
select which DHT port to report based on the connection's local endpoint ( #2316 )
2017-09-10 10:25:04 +02:00
arvidn
55228756e5
make disk job flags type safe
2017-09-10 08:56:52 +02:00
arvidn
bb51dcdbb9
move dht_settings into its own header cpp file-pair and dht_settings into the dht namespace
2017-09-04 22:38:16 +02:00
arvidn
95c8c3018a
use span in gzip, http_parser and http_connection
2017-09-04 22:33:38 +02:00
arvidn
3da7d1d3da
fix documentation issue
2017-09-04 16:50:11 +02:00
arvidn
061732ddec
bump version
2017-09-04 15:35:45 +02:00
arvidn
53ff169db1
use string_view in find_metric_idx
2017-09-04 07:50:13 +02:00
arvidn
fe1c395579
merged RC_1_1 into master
2017-09-03 13:57:19 +02:00
arvidn
37ffe99a19
fix gen_fwd.py to correctly put declarations in the dht namespace that belong there
2017-09-03 12:28:34 +02:00
Steven Siloti
5361ffc1c2
add_file_borrow: use string_view instead of pointer, size parameters ( #2302 )
2017-09-02 23:58:36 +02:00
arvidn
7087a16b36
move some initialization of torrent from start() into the constructor
2017-09-02 21:24:00 +02:00
arvidn
2025c15ec1
cleanup tokenize_string -> split_string
2017-09-02 07:46:16 +02:00
arvidn
f8ba4f480f
use span in parse_utf8_codepoint
2017-09-02 07:03:46 +02:00
arvidn
11f008e90e
use a strong typedef for port mapping id
2017-09-02 07:02:07 +02:00
Steven Siloti
f022285b13
include endpoint in tracker alerts
2017-09-01 13:38:36 +02:00
Arvid Norberg
f734ad067b
straighten out some type-safety in port mapping enums ( #2285 )
2017-08-30 20:47:49 +02:00
Alden Torres
5db597c8b3
more use of std::tuple_size<> and empty()
2017-08-28 22:47:34 +02:00
Arvid Norberg
1075ae3b8d
remove session pool allocator and use the buffer class instead ( #2274 )
...
simplify append_buffer by using size() to determine size of the buffer. make the move explicit in chained_buffer::init_buffer_entry
2017-08-28 11:37:53 +02:00
Steven Siloti
cc3f73de96
add span ctor from const containers ( #2275 )
2017-08-28 11:36:51 +02:00
Arvid Norberg
d250ba5a17
wrap destination string in i2p_peer in string_ptr handler ( #2268 )
2017-08-25 09:42:46 +02:00
arvidn
e92cbf502c
remove the last use of session_impl get_ipv6_interface and get_ipv4_interface
2017-08-23 21:01:15 +02:00
arvidn
22c047f8a0
factor out and simplify get_syncoffset
2017-08-23 06:59:44 +02:00
arvidn
f311bf354e
remove left-overs from disk buffer pool allocator
2017-08-21 16:36:00 +02:00
Alden Torres
66734e2e5b
using if_indextoname instead of RTM_GETLINK to fill the interface name in enum_net_interfaces ( #2253 )
...
using if_indextoname instead of RTM_GETLINK to fill the interface name in enum_net_interfaces. removed IFA_LABEL switch case, removed ip_interface::mtu, master rebase
2017-08-20 10:55:59 +02:00
arvidn
fe37884bc6
fix IPv6 tracker support by performing the second announce in more cases
2017-08-19 18:56:51 +02:00
Steven Siloti
2365611507
remove support for using a pool allocator for disk buffers ( #2257 )
2017-08-19 11:04:39 +02:00
arvidn
05b5b4ef4d
merged RC_1_1 into master
2017-08-16 22:46:47 +02:00
arvidn
b70d3efba9
fix infinite loop when parsing torrents whose filenames have zeroes. #2247
2017-08-16 07:21:34 +02:00
Alden Torres
bde4718e3f
typos, auto loop refactor and more std::
2017-08-16 07:01:50 +02:00
arvidn
b03b7417dd
build boost from scratch on linux (to get a newer version). upgrade travis to trusty and newer xcode. python binding fixes
2017-08-14 12:22:06 +02:00
Alden Torres
48de05ba82
lint-based code review in utp related code
2017-08-13 07:49:43 +02:00
arvidn
865ff09a84
merge RC_1_1 into master
2017-08-10 16:44:57 +02:00
arvidn
4e497e1383
fix issue where paths were not correctly coalesced when adding files to file_storage (used more memory than necessary)
2017-08-10 12:10:46 +02:00
arvidn
dbea43ab35
fix typo in comment
2017-08-10 07:59:16 +02:00
arvidn
bb6f2b9837
extend file_storage tests. Make pad files separate paths and file names properly
2017-08-10 01:33:35 +02:00
Alden Torres
721c4d016a
more use of emplace_back in write_resume_data ( #2221 )
2017-08-09 00:19:11 +02:00
Alden Torres
8ed17ab311
minor code refactor, more use of nullptr, typos
2017-08-07 21:15:14 +02:00
Alden Torres
0b83b6b6df
fix typo and extra ::alert
2017-08-06 04:28:36 +02:00
arvidn
7b98af8145
improve type-safety of observer_flags and traversal_flags
2017-08-05 20:20:13 +02:00
Alden Torres
1e05a91f99
added some std:: in public api
2017-08-05 02:44:25 +02:00
arvidn
5bf28e37b8
make create_torrent flags type-safe
2017-08-04 21:23:42 +02:00
Alden Torres
cb114a80e1
reverted ino_t cast and added fix only for android
2017-08-04 21:22:20 +02:00
arvidn
6b1037eff5
convert enum values that are just used as constants, to actual constants with the correct type
2017-08-04 15:23:20 +02:00
arvidn
a8a5986046
make file attributes (in file_storage) type safe
2017-08-04 07:38:57 +02:00
Alden Torres
ae0baff5a3
using status_flags_t::all() in post_torrent_updates, minor typos
2017-08-04 01:51:52 +02:00
arvidn
6fa181ece8
some cleanup of type-safe flags
2017-07-30 18:20:15 -07:00
arvidn
322007bb6a
make save_state_flags a strong type
2017-07-30 09:06:41 -07:00
arvidn
69bd2986de
convert a few more torrent_handle flags to type safe types
2017-07-27 13:16:23 -07:00
arvidn
204a029b5f
merged RC_1_1 into master
2017-07-27 11:37:02 -07:00
Johan Gunnarsson
972f179a5c
Stop using deprecated save_proxy in header files
...
Without this patch, compiler will warn about save_proxy being used by merely
including session_handle.hpp:
/tmp/include/libtorrent/session_handle.hpp:104:45: warning: ‘save_proxy’ is deprecated [-Wdeprecated-declarations]
save_dht_proxy TORRENT_DEPRECATED_ENUM = save_proxy,
^~~~~~~~~~
/tmp/include/libtorrent/session_handle.hpp:102:4: note: declared here
save_proxy TORRENT_DEPRECATED_ENUM = 0x008,
^~~~~~~~~~
/tmp/include/libtorrent/session_handle.hpp:105:46: warning: ‘save_proxy’ is deprecated [-Wdeprecated-declarations]
save_peer_proxy TORRENT_DEPRECATED_ENUM = save_proxy,
^~~~~~~~~~
/tmp/include/libtorrent/session_handle.hpp:102:4: note: declared here
save_proxy TORRENT_DEPRECATED_ENUM = 0x008,
^~~~~~~~~~
/tmp/include/libtorrent/session_handle.hpp:106:45: warning: ‘save_proxy’ is deprecated [-Wdeprecated-declarations]
save_web_proxy TORRENT_DEPRECATED_ENUM = save_proxy,
^~~~~~~~~~
/tmp/include/libtorrent/session_handle.hpp:102:4: note: declared here
save_proxy TORRENT_DEPRECATED_ENUM = 0x008,
^~~~~~~~~~
/tmp/include/libtorrent/session_handle.hpp:107:49: warning: ‘save_proxy’ is deprecated [-Wdeprecated-declarations]
save_tracker_proxy TORRENT_DEPRECATED_ENUM = save_proxy
^~~~~~~~~~
/tmp/include/libtorrent/session_handle.hpp:102:4: note: declared here
save_proxy TORRENT_DEPRECATED_ENUM = 0x008,
^~~~~~~~~~
2017-07-27 11:31:39 -07:00
arvidn
24e4263bae
make torrent status flags be type safe
2017-07-27 09:33:35 -07:00
arvidn
5222d92e9f
make resume_data_flags type safe
2017-07-27 00:07:15 -07:00
arvidn
8d0f38930e
make udp send flags type safe
2017-07-26 18:09:17 -07:00
arvidn
83ca755d1b
simplify setup_listener
2017-07-26 12:02:58 -07:00
arvidn
cd343c91bc
make base32encode flags type safe
2017-07-26 10:38:14 -07:00
arvidn
b38efb6c65
make alert category flags be a strong type
2017-07-26 07:20:47 -07:00
arvidn
c167e28788
move stack allocator implementation into its own cpp file
2017-07-23 16:49:24 -07:00
arvidn
330904f460
convert picker_flags_t to type safe flags
2017-07-23 09:29:25 -07:00
arvidn
78bbd298a5
convert file_open_mode to type safe flags
2017-07-22 23:58:24 -07:00
Steven Siloti
140b8ace8d
remove use of deprecated function readdir_r
2017-07-22 22:40:17 -07:00
arvidn
c4eb4c8b5f
use span in torrent_info constructors and deprecate the redundant flags argument
2017-07-22 00:00:44 -07:00
Steven Siloti
5eba09fce7
changes based on review feedback
2017-07-21 19:18:44 -07:00
Steven Siloti
1a64490ef0
fix
2017-07-21 19:18:44 -07:00
Steven Siloti
f0ae2145ea
use a handle class for listen sockets instead of raw pointers
...
Listen socket handles need to be week_ptr so that they can detect when a listen
socket is removed in the middle of a tracker announce on it. Use a wrapper class
to enforce that no one outside of session_impl can hold ownership of the socket
across event boundaries.
To support unit tests, listen_socket_t is also split into a base class which
holds the members needed to support the public listen socket API.
2017-07-21 19:18:44 -07:00
Steven Siloti
e0dcd34352
convert m_listen_sockets to a vector of shared_ptr
2017-07-21 19:18:43 -07:00
Steven Siloti
0f30815d8f
Revert "don't move listen_socket_t when deleting sockets"
...
This reverts commit 718c5f0dcb
.
2017-07-21 19:18:43 -07:00
Johan Gunnarsson
7a95947bac
Add torrent_flags.hpp to Makefile.am
2017-07-21 15:46:48 -07:00
arvidn
33a2abebfe
submit disk jobs in read_piece()
2017-07-18 07:21:07 -07:00
arvidn
3ce15b36d1
fix some c++11 parsing issues in reference doc generation script
2017-07-17 22:01:54 -07:00
arvidn
f9c45db942
make bandwidth state flags use type-safe flags
2017-07-17 19:03:42 -07:00
arvidn
06070ea499
convert block request flags to type-safe flags
2017-07-17 17:56:07 -07:00
arvidn
c4659bc345
convert peer_flags and peer_source_flags to type-safe flags
2017-07-17 10:22:32 -07:00
arvidn
4947602a2f
make add_torrent_params::flags_t an enum class and move it out into its own header
2017-07-17 01:05:31 -07:00
AllSeeingEyeTolledEweSew
00655d562b
Refactor several flags to torrent_handle::get_flags/set_flags.
2017-07-17 01:05:31 -07:00
arvidn
73942de97a
carve out peer_list_entry into also being deprecated (it was only used by deprecated functions and some tests)
2017-07-16 19:20:29 -07:00
toinetoine
b1c3e12cd0
added block_uploaded_alert to allow client to track upload activity
2017-07-16 11:04:03 -07:00
arvidn
d32341b986
slight improvements to the bitfield_flag type
2017-07-16 09:50:48 -07:00
arvidn
c4afb5e949
use a dedicated class template for flags types instead of enum class. It's more backwards compatible and improves ergonomics
2017-07-15 01:15:57 -07:00
arvidn
c692147c94
merged RC_1_1 into master
2017-07-13 19:55:29 -07:00
arvidn
cc30434c52
fix inconsistency in file_priorities and override_resume_data behavior. file_priorities are not subject to the override_resume_data flag
2017-07-12 15:36:55 -07:00
arvidn
7eb3cf6bc6
use the official boost.config header
2017-07-12 11:31:29 -07:00
d-komarov
85cf521145
fix bandwith rate limit calculation ( #2134 )
...
back-port of fc0cbfb789
2017-07-11 21:35:12 -07:00
Steven Siloti
2e79c5e648
fix handling of SSL listen sockets
2017-07-10 21:41:39 -07:00
d-komarov
11d6a00bec
fix storage destruction order issue ( #2138 )
...
back-ported from b553cb32f7
2017-07-10 21:35:34 -07:00
Steven Siloti
389b4eb3f2
make listen_socket_t non-copyable and non-movable ( #2137 )
...
The DHT stores a pointer to this struct so it must not be copied or moved once
it is stored in m_listen_sockets.
2017-07-10 10:14:36 -07:00
Steven Siloti
718c5f0dcb
don't move listen_socket_t when deleting sockets
...
Pointers to listen_socket_t are stored in dht_tracker, so they
cannot be copied or moved once they are added to m_listen_sockets.
listen_socket_t should really be made non-copyable and non-moveable, but the
socket creation path needs to be refactored before that can be done.
2017-07-08 08:42:04 -07:00
Alden Torres
80036f0377
avoid executing timed async task if the dht node is already removed ( #2133 )
2017-07-08 08:32:24 -07:00
Steven Siloti
ec2fb91aa5
reject put messages with incorrect bencoding ( #2118 )
...
add function to check for soft bdecode errors. reject put messages with incorrect bencoding
2017-07-02 18:30:32 -04:00
arvidn
5188c190db
bump version number
2017-07-02 15:03:46 -04:00
arvidn
5c37eb174f
drop support for windows compilers without std::string and wchar_t (believed to be old cygwin)
2017-07-02 08:24:55 -04:00
arvidn
dc76f8a769
start a document of changes from 1.1 to 1.2
2017-06-30 08:29:47 -04:00
arvidn
20c1407612
corrected missing const qualifiers on bdecode_node
2017-06-30 08:19:10 -04:00
arvidn
3c8450d47c
fix backwards compatibility issue when loading the torrent info dict from resume data
2017-06-29 15:03:49 -04:00
Steven Siloti
bbf361336b
Use netlink to enumerate network interfaces on linux ( #2105 )
...
* move getting a table dump over netlink to a separate function
* use netlink to enumerate network interfaces on linux
2017-06-27 00:34:24 -04:00
arvidn
ed79929528
factor out has_any_file to storage_utils
2017-06-23 16:33:48 -04:00
arvidn
b7642f75d5
move clear_bufs out of storage.cpp into storage_utils
2017-06-21 13:04:05 -04:00
arvidn
2af4e936c4
fix master build
2017-06-21 13:03:36 -04:00
arvidn
f85c01cc0a
merged RC_1_1 into master
2017-06-21 00:51:43 -04:00
Alden Torres
687e0ea4b4
added consts and minor auto refactor in upnp.cpp
2017-06-20 17:59:05 -04:00
arvidn
aa842948a3
storage_params cleanup
2017-06-20 10:27:28 -04:00
arvidn
046bb76361
handle invalid arguments to set_piece_deadline()
2017-06-19 05:46:08 -04:00
arvidn
35491bc476
convert remaining alerts to use operation_t instead of string literal
2017-06-18 22:05:50 -04:00
arvidn
f04d729d43
enforce spell checking on CI
2017-06-18 15:51:51 -04:00
arvidn
ff454a92d4
unify some operation-enums and strings to use operation_t
2017-06-18 07:31:45 -04:00
arvidn
53cbb607d0
first steps towards spell checking documentation
2017-06-17 22:59:57 -04:00
arvidn
ff8703e862
make alert types ABI compatible between builds with deprecated members enabled and without
2017-06-17 16:07:06 -04:00
arvidn
1fd350cf60
make operation_t an enum class, for type safety
2017-06-15 07:00:06 -04:00
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
Pavel Pimenov
de369451b1
fix operator() ==, add const ( #2063 )
2017-06-10 08:18:32 +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
arvidn
700befc98a
fix for what appears to be an clang/llvm miscompilation
2017-06-07 22:35:35 +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
ea851e955e
avoid netlink.hpp compilation errors due to lack of comparison operators for sockaddr_nl
2017-06-02 20:36:59 +02:00
arvidn
5e384ccce3
more typed_span conversion fixes
2017-06-02 17:32:27 +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
arvidn
48bb1d2c95
fix default value for move_storage
2017-06-01 23:08:14 +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
arvidn
77dcc5363f
fix build with exceptions disabled
2017-05-28 06:42:49 -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
Steven Siloti
40cfceb994
restore find_plugin API ( #2026 )
2017-05-24 23:29:21 -04:00
arvidn
392f284566
remove some unused stats gathering state in disk_io_thread
2017-05-23 08:16:25 -04:00
Alden Torres
071c95ec90
missing explicit in merge from RC_1_1
2017-05-22 17:30:46 -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
e79a7a08b9
fix race condition in storage tick handling in disk_io_thread
2017-05-18 10:21:34 -04:00
arvidn
b547a2cef0
fix deprecation warnings
2017-05-16 08:14:21 -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
arvidn
9333c51da6
deprecate partial_piece_info::piece_state
2017-05-14 20:15:55 -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
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
arvidn
76ef0babed
remove deprecated file_base feature of file_storage
2017-05-04 12:03:31 -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
pavel.pimenov
e8a3ddf03b
opt web_seed_entry operator==
2017-05-02 07:46:39 -04:00
pavel.pimenov
4cf2bedde9
remove void* m_userdata
2017-04-30 21:15:08 -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
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
arvidn
2dca174785
improve span container constructor
2017-04-28 08:17:57 -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
d138f02424
introduce lt namespace alias
2017-04-23 23:43:58 -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
cdd50be859
create a separate DHT node for each listen socket
2017-04-23 19:49:49 -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
Alden Torres
87592d50f2
minor typos and documentation changes in settings
2017-04-18 17:51:26 -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
arvidn
cef9773c70
generalize part_file::export_file to pass back the buffers to a callback function
2017-04-15 20:01:18 -04:00
arvidn
48e61b947a
remove mutex-release hack in file_pool
2017-04-14 12:45:18 -07:00
arvidn
645d658214
merged RC_1_1 into master
2017-04-13 07:42:32 -07:00
Arvid Norberg
e7a379551c
discourage forward declarations of libtorrent types, introduce forward declaration header ( #1910 )
2017-04-13 06:48:01 -07:00
arvidn
91838d8a65
clean up declaration for removed function
2017-04-12 21:00:41 -07:00
arvidn
480bde9333
change formatting of namespace declarations
2017-04-12 14:26:35 -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
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
Arvid Norberg
13b16a63a3
use unsigned type for file flags. make file_pool private to disk_io_thread ( #1894 )
...
use unsigned type for file flags. make file_pool private to disk_io_thread. move close_file_interval logic to the disk thread. don't expose file in public interface, and make pool_file_status properly public (not part of file_pool and renamed to open_file_status), this is exposed in public interface via torrent_handle::file_status()
2017-04-08 18:24:50 -04:00
arvidn
86f67bd9d9
return a reference instead of pointer to file_storage in storage_interface
2017-04-07 20:27:38 -04:00
Alden Torres
e4bdd14ae7
implemented ip_change_notifier_macos ( #1891 )
...
implemented ip_change_notifier_macos
2017-04-07 17:53:12 -04:00
arvidn
51c42adc3e
steps towars making file_pool private to disk_io_thread
2017-04-07 08:38:35 -04:00
Alden Torres
df0a3bd015
moved current ip_change_notifier implementation to compilation unit ( #1890 )
...
moved current ip_change_notifier implementation to compilation unit
2017-04-05 23:42:37 -04:00
Alden Torres
cec874591d
moved ip_notifier.hpp to aux_
2017-04-05 20:37:32 -04:00
Alden Torres
65cf7af722
using unique_ptr for m_ip_notifier in session_impl
2017-04-05 17:43:12 -04:00
arvidn
9e5822dfba
remove unused m_tick_residual accounting
2017-04-05 01:35:39 -04:00
Alden Torres
0132221031
minor code cleanup, std:: prefix, consts, typos
2017-04-04 23:12:48 -04:00
Alden Torres
45bea967c2
added resolver_cache_timeout setting ( #1878 )
...
added resolver_cache_timeout setting
2017-04-04 18:23:37 -04:00
arvidn
b065536023
bump version number
2017-04-02 18:34:45 -04:00
arvidn
0319b53d5f
imrove some test coverage and fix bug in trim() function
2017-03-31 09:43:25 -04:00
pavel.pimenov
6afb0fd51b
fix m_host_resolver (for RC_1_1)
2017-03-31 07:29:03 -04:00
arvidn
6584423737
don't include base32encode in the build when i2p is disabled
2017-03-31 07:24:50 -04:00
Alden Torres
990756ca38
code cleanup related to async_resolve ( #1873 )
2017-03-30 23:00:59 -04:00
Arvid Norberg
65a2413797
make parse_magnet_uri take a string_view instead of std::string ( #1870 )
...
make parse_magnet_uri take a string_view instead of std::string
2017-03-30 22:55:54 -04:00
Arvid Norberg
694127a875
fix build ( #1874 )
...
fix build
2017-03-30 22:51:39 -04:00
arvidn
d720b282b8
Merge branch 'master' of https://github.com/arvidn/libtorrent
2017-03-30 18:14:09 -04:00
arvidn
0b6fe4d0bd
merged RC_1_1 into master
2017-03-30 18:07:24 -04:00
Pavel Pimenov
923f2c48fc
fix m_host_resolver ( #1871 )
...
fix initialization order of m_host_resolver and m_tracker_manager
2017-03-30 08:47:41 -04:00
Arvid Norberg
b8e77444d5
use span for read_resume_data() ( #1867 )
...
use span for read_resume_data()
2017-03-29 16:10:32 -04:00
Arvid Norberg
8ebbad19d4
deprecate add_torrent_params::url field. use parse_magnet_uri instead ( #1864 )
...
deprecate add_torrent_params::url field. use parse_magnet_uri instead
2017-03-29 02:16:07 -04:00
arvidn
02bb1251d2
removed (broken) support for incoming connections over socks5
2017-03-29 02:15:43 -04:00
arvidn
d5a6256b51
improve documentation on peer classes
2017-03-27 23:39:03 -04:00
Alden Torres
f80e95705a
minor general code cleanup and refactor
2017-03-27 23:38:09 -04:00
arvidn
86786770b7
merged RC_1_1 into master
2017-03-27 01:24:43 -04:00
arvidn
910ccc528f
deprecate torrent_added_alert in favor of add_torrent_alert
2017-03-26 22:48:17 -04:00
arvidn
b25178e7c8
avoid flooding the alert queue in client_test
2017-03-26 21:48:27 -04:00
arvidn
fb60c23807
improve resume data handling in client_test
2017-03-26 19:04:50 -04:00
arvidn
6cdd598e7c
make add_torrent_params movable and have add_torrent/async_add_torrent take it by value
2017-03-26 16:48:57 -04:00
Arvid Norberg
103b1176c1
remove torrent_file_path asynchronous loading of .torrent files. ( #1848 )
...
remove torrent_file_path asynchronous loading of .torrent files. This is not the responsibility of the client, to simplify and unify the path of adding torrents
2017-03-26 09:16:42 -04:00
arvidn
7640c0641e
optimize download queue management with an explicit queue
2017-03-25 20:47:33 -04:00
arvidn
8e6f417015
make torrent_status movable and don't allocate pieces unless it's asked for
2017-03-25 16:22:59 -04:00
arvidn
8cc17a4524
optimize access to ssl_cert. specifically the case where there is none, avoid pessimisation of the common case
2017-03-23 21:55:20 -04:00
arvidn
488c1a2dcf
deprecated (undocumented) file:// urls, added torrent_file_path alternative
2017-03-23 20:26:55 -04:00
arvidn
206a80acfb
optimize construction of disk io storage objects
2017-03-23 17:45:11 -04:00
Alden Torres
fcbcc250bb
fix setup of DHT logic in session_impl::init ( #1830 )
...
fix setup of DHT logic in session_impl::init
2017-03-23 08:32:56 -04:00
arvidn
4d397f5ebf
fix minor robustness issue in DHT bootstrap logic
2017-03-21 12:29:08 -04:00
Arvid Norberg
17f371ddf2
fix alignment issues in heterogeneous_queue ( #1834 )
...
fix alignment issues in heterogeneous_queue
2017-03-20 17:41:00 -04:00
Arvid Norberg
cd0777d4a9
fix master build ( #1833 )
...
fix master build
2017-03-19 18:53:05 -04:00
arvidn
64f5567cdd
merged RC_1_1 into master
2017-03-19 12:58:55 -04:00
arvidn
1dd0e9b280
use string_view instead of strcmp
2017-03-18 15:54:38 -04:00
Arvid Norberg
642cfa387d
add limit for number of web seed connections ( #1817 )
...
add limit for number of web seed connections
2017-03-18 15:53:07 -04:00
Alden Torres
1280c7f7ae
is_ip_address refactor and minor code cleanup ( #1828 )
...
is_ip_address refactor and minor code cleanup
2017-03-18 11:07:17 -04:00
Alden Torres
1d1484d689
fixing remaining clang sign warnings ( #1825 )
...
fixing remaining clang sign warnings
2017-03-18 08:49:19 -04:00
arvidn
17bc05c582
improve stats counter documentation
2017-03-18 08:22:24 -04:00
Andrei Kurushin
9efb72197c
use decltype(auto) return types for MSVC ( #1815 )
...
use decltype(auto) return types for MSVC
2017-03-17 20:47:10 -04:00
Arvid Norberg
65cb7cdf34
improve deprecated markup ( #1823 )
...
improve deprecated markup
2017-03-17 20:41:47 -04:00
Alden Torres
dba94a9276
fix IndexType template parameter in typed_span member functions ( #1819 )
...
fix IndexType template parameter in typed_span member functions
2017-03-17 18:15:11 -04:00
arvidn
3a1379ef1e
merged RC_1_1 into master
2017-03-14 12:55:13 -04:00
arvidn
6f650aa7d9
document deprecation of dynamic loading/unloading of torrents
2017-03-13 21:21:38 -04:00
arvidn
e37e4bfe8a
include user-agent in tracker announces in anonymous_mode for private torrents
2017-03-12 21:10:00 -04:00
Alden Torres
6ab18136f0
created new session_stats_header_alert, master rebase
2017-03-10 21:04:12 -05:00
arvidn
5cb12318c5
fix bug where settings_pack::file_pool_size setting was not being honored
2017-03-09 08:18:10 -05:00
Alden Torres
a8b10a7449
more sign warnings fixes ( #1775 )
...
more sign warnings fixes
2017-03-09 07:46:52 -05:00
arvidn
6d54c20adf
merge RC_1_1 into master
2017-03-08 18:01:59 -05:00
Alden Torres
2a42058f74
minor refactor in counters_to_array and some typos
2017-03-08 08:27:00 -05:00
Arvid Norberg
7d3a8f5b19
don't remove peers from the connection list immediately when disconnecting ( #1782 )
...
don't remove peers from the connection list immediately when disconnecting them, but defer it until later. This makes it less error prone to disconnect peers in loops over the connections
2017-03-07 13:50:03 -05:00
arvidn
faa2029f8b
add feature to periodically close files (to make windows clear disk cache)
2017-03-06 23:46:47 -05:00
Arvid Norberg
a34ce0278e
add write_resume_data() function ( #1776 )
...
add write_resume_data() function. Make resume data alert use an add_torrent_params object
2017-03-05 09:31:28 -05:00
Arvid Norberg
8cf6e9e37c
use span<> to return the block_info for a piece ( #1777 )
...
use span<> to return the block_info for a piece to improve range checks and loops
2017-03-04 23:45:07 -05:00
Alden Torres
1ae8856d93
more use of total_seconds
2017-03-01 23:33:45 -05:00
pavel.pimenov
78442e9a2c
bdecode_node - add const
2017-02-27 19:44:12 -05:00
Alden Torres
3764ee62cb
fixing sign-conversion warnings, part 23, final ( #1763 )
...
fixing sign-conversion warnings, part 23, final
2017-02-27 11:50:53 -05:00
arvidn
081365fbcf
merge RC_1_1 into master
2017-02-26 00:48:12 -05:00
arvidn
5a19c9a5a1
fix makefile
2017-02-25 23:01:28 -05:00
Alden Torres
97c8d0486c
fixing sign-conversion warnings, part 21, file_flags ( #1750 )
...
fixing sign-conversion warnings, part 21, file_flags
2017-02-25 19:06:31 -05:00
Arvid Norberg
3e83c4119f
fix recent settings_pack ABI regression ( #1752 )
...
fix recent settings_pack ABI regression
2017-02-24 08:06:59 -05:00
Alden Torres
847792854d
fixing sign-conversion warnings, part 20 ( #1745 )
...
fixing sign-conversion warnings, part 20
2017-02-22 23:28:25 -05:00
Mengyang Li
7204082088
Update storage.hpp
...
Fix typo
2017-02-22 22:44:09 -05:00
Alden Torres
ee4d82d166
fix in DHT counters, alert types test, typos, formatting ( #1747 )
...
fix in DHT counters, alert types test, typos, formatting
2017-02-22 17:40:14 -05:00
sledgehammer_999
9bb420b074
Move include into implementation instead(from #1703 ).
2017-02-21 20:19:53 -05:00
Alden Torres
23edbfbee8
fixing sign-conversion warnings, part 19
2017-02-21 15:16:37 -05:00
Alden Torres
267cab6822
fixing sign-conversion warnings, part 18
2017-02-21 01:41:34 -05:00
arvidn
6d40d3a167
bump version number
2017-02-20 12:43:34 -05:00
Arvid Norberg
5f69e8217c
clean up xml parser, to use string_view ( #1731 )
...
clean up xml parser, to use string_view
2017-02-19 07:34:55 -05:00
Alden Torres
1e98bf19a5
added support for enumerating the internal DHT live nodes ( #1712 )
...
added support for enumerating the internal DHT live nodes
2017-02-18 23:02:23 -05:00
arvidn
9dd48e88a4
make the utp_socket_manager a reference instead of a pointer in utp_stream
2017-02-18 22:44:53 -05:00
Alden Torres
1ab1b98138
optimized dht_get_peers_reply_alert storage and created alerts unit test ( #1714 )
...
optimized dht_get_peers_reply_alert storage and created alerts unit test
2017-02-18 00:13:46 -05:00
Alden Torres
a670871519
fix build from RC_1_1 merge
2017-02-17 19:06:51 -05:00
arvidn
3ffa3f2a08
merged RC_1_1 into master
2017-02-17 00:35:49 -05:00
Andrei Kurushin
9bee2146d0
complete UNC path support ( #1689 )
...
complete UNC path support. all internal file api functions handle long size paths (> MAX_PATH) and special names (CON,PRN ...) with unit test
2017-02-16 23:47:08 -05:00
Alden Torres
6819823f1f
minor refactor of deprecated user_load_function_t
2017-02-16 07:04:22 -05:00
Arvid Norberg
116802fcdf
update tuning documentation ( #1717 )
...
update tuning documentation and make the stats header be posted when logging is disabled (if stats_notifications are enabled)
2017-02-16 07:03:43 -05:00
Alden Torres
f407d85349
minor formatting of end of line open brace
2017-02-15 11:31:53 -05:00
Pavel Pimenov
7f4c8aaf75
Add const peer_request p -> peer_request const& p ( #1705 )
...
Add const peer_request p -> peer_request const& p
2017-02-14 00:17:02 -05:00
arvidn
cbd1c26a11
fix ABI compatibility issue introduced with preformatted entry type
2017-02-12 20:42:30 -05:00
arvidn
21c9a493f6
fix master build
2017-02-12 08:33:25 -05:00
arvidn
5971818969
merge RC_1_1 into master
2017-02-12 02:24:14 -05:00
Alden Torres
2370c33872
fixing sign-conversion warnings, part 16, upnp class
2017-02-11 20:49:26 -05:00
arvidn
ee2688b83a
use unique_ptr for packets in utp_stream
2017-02-11 17:11:49 -05:00
Alden Torres
4a80e2667c
fixing sign-conversion warnings, part 15, torrent class ( #1686 )
...
fixing sign-conversion warnings, part 15, torrent class
2017-02-11 14:58:02 -05:00
Arvid Norberg
ff22c68df8
packet pool fixups ( #1682 )
...
packet pool fixups
2017-02-10 20:54:26 -05:00
Alden Torres
4d5ddc90f5
fixing sign-conversion warnings, part 14, minor refactor
2017-02-10 15:27:49 -05:00
Andrei Kurushin
76f91c3fc9
packet allocation pool ( #1600 )
...
packet allocation pool:
- no more direct malloc/free with cast
- reuse allocated memory for 3 common allocation case (with limit)
- access to packet_pool through utp_socket_manager instance
2017-02-10 08:25:03 -05:00
Andrei Kurushin
c33081b075
- add windows guid listen_interfaces settings example ( #1677 )
...
add windows guid listen_interfaces settings example. rearrange comments for corresponding methods
2017-02-08 19:13:25 -05:00
Alden Torres
1f72843fe3
fixing sign-conversion warnings, part 13, minor refactor ( #1675 )
...
fixing sign-conversion warnings, part 13, minor refactor
2017-02-07 23:36:13 -05:00
ximply
c4d96c7aa9
add web_seed_name_lookup_retry to session_settings ( #1674 )
...
add web_seed_name_lookup_retry to session_settings to control web seed
name lookup retry in seconds, default is 1800 seconds
2017-02-07 01:34:52 -05:00
Alden Torres
c8569b5e34
fixing sign-conversion warnings, part 12, minor refactor, eol cleanup ( #1670 )
...
fixing sign-conversion warnings, part 12, minor refactor, eol cleanup. created aux::clamp and default_piece_priority refactor
2017-02-07 00:22:30 -05:00
Alden Torres
b84766e346
minor cleanup refactor
2017-02-06 18:26:59 -05:00
Arvid Norberg
9e4045ed42
use 32 bit time points in torrent ( #1662 )
...
use 32 bit time points in torrent and add some slack to time point comparisons in python test
2017-02-05 19:18:06 -05:00
Alden Torres
bfe6aba728
more robust implementation of aux::array::end_index
2017-02-05 19:17:23 -05:00
arvidn
381defab05
merged RC_1_1 into master
2017-02-05 12:51:48 -05:00
arvidn
7ff4f56ae2
add function to get default settings
2017-02-05 11:31:43 -05:00
Alden Torres
de6f2a9d88
fixing sign-conversion warnings, part 11, created aux::array and refactor ( #1649 )
...
fixing sign-conversion warnings, part 11, created aux::array and refactor
2017-02-04 22:05:53 -05:00
Arvid Norberg
c00a25a645
back-port aldenml's fix to not save replacement nodes twice to 1.1 ( #1661 )
...
back-port aldenml's fix to not save replacement nodes twice to 1.1
2017-02-04 19:58:32 -05:00
Falcosc
a9d6d54111
fix multible torrent status timer bugs related to move time ( #1492 )
...
fix last_upload and last_download overflow after 9 hours in past. change last_upload, last_download, finished_time, resume, upload_mode_time to time_point and duration
2017-02-04 13:34:14 -05:00
Alden Torres
3ef4109bf3
avoid double saving of replacements nodes, removed replacement_cache, test ( #1656 )
...
avoid double saving of replacements nodes, deprecated replacement_cache, test
2017-02-04 11:25:11 -05:00
arvidn
34ecb60c09
use enum class for close reason
2017-02-04 11:24:35 -05:00
Alden Torres
4c487ec47c
using std:: for integral types
2017-02-03 22:15:47 -05:00
arvidn
c8e488b094
merged RC_1_1 into master
2017-02-02 22:58:33 -05:00
Arvid Norberg
4733670aa1
fix issue where num_seeds could be greater than num_peers in torrent_status ( #1645 )
...
fix issue where num_seeds could be greater than num_peers in torrent_status
2017-02-01 01:39:09 -05:00
Falcosc
e40bdc566c
1.1.2 set queue position by number ( #1617 )
...
set queue position by number
2017-01-30 21:31:31 -05:00
Arvid Norberg
29db3de6c0
wrap most instances of throw, and terminate on builds where exceptions are disabled ( #1639 )
...
wrap most instances of throw, and terminate on builds where exceptions are disabled
2017-01-29 15:37:42 -05:00
arvidn
3339b2abe1
back port file progress invariant checking to 1.1
2017-01-29 15:34:06 -05:00
arvidn
36858eae85
cleanup packet_buffer class
2017-01-29 10:35:23 -05:00
Alden Torres
2437b3c134
created aux::typed_span and related refactor
2017-01-28 23:28:38 -05:00
arvidn
1bef80c3fa
report the true state of super_seeding of a torrent. If the torrent leaves finished or seeding state, it will clear it already
2017-01-28 21:27:25 -05:00
arvidn
95c8c1de0f
fix build
2017-01-28 21:26:46 -05:00
Alden Torres
deecdb6cfa
added support for infohashes sample in dht storage ( #1586 )
...
added support for infohashes sample in dht storage
2017-01-28 20:24:53 -05:00
arvidn
17ee28d176
Merge branch 'master' of https://github.com/arvidn/libtorrent
2017-01-28 14:36:28 -05:00
arvidn
6b91adab6a
merged RC_1_1 into master
2017-01-28 14:36:23 -05:00
Alden Torres
3803661863
moved alloca.hpp to private aux_ and size refactor ( #1634 )
...
moved alloca.hpp to private aux_ and size refactor
2017-01-27 12:43:34 -05:00
Alden Torres
ddf1b62e4b
fixing sign-conversion warnings, part 9
2017-01-27 01:23:18 -05:00
Alden Torres
533699bbb5
making strong_typedef::UnderlyingType constexpr and warnigs cleanup
2017-01-26 16:32:30 -05:00
Alden Torres
2bc7a60f33
fixing sign-conversion warnings, part 8, created aux::unique_ptr, refactor ( #1616 )
...
fixing sign-conversion warnings, part 8, created aux::unique_ptr, refactor
2017-01-26 08:31:20 -05:00
Alden Torres
070e85090b
more std:: prefix, consts, auto refactor, formatting
2017-01-26 08:30:20 -05:00
Alden Torres
22b745d548
added TORRENT_NO_DEPRECATE around file_progress_float
2017-01-25 23:44:30 -05:00
Arvid Norberg
ba9fae8e1f
fix issue with unloading torrents ( #1624 )
...
fix issue with unloading torrents
2017-01-25 23:42:59 -05:00
Alden Torres
4ddd4b72c6
fixing sign-conversion warnings, part 7 ( #1604 )
...
fixing sign-conversion warnings, part 7
2017-01-24 01:35:17 -05:00
arvidn
605227d9da
add test for get_cache_info
2017-01-24 01:31:16 -05:00
Alden Torres
4896a5ed3c
added handler_storage default constructor when not TORRENT_USE_ASSERTS
2017-01-23 18:27:24 -05:00
Andrei Kurushin
7c9679bf6a
fix missed static array specifier
2017-01-23 08:21:34 -05:00
arvidn
4c4a204bee
fix inclusion of auxv.h header and definition of TORRENT_ANDROID
2017-01-22 14:11:44 -05:00
arvidn
c15a575e34
remove dependency on aligned_storage and aligned_union to support older versions of GCC
2017-01-22 14:11:44 -05:00
Alden Torres
8b98bf2c9d
more use of peer_class_t in public API
2017-01-22 14:06:27 -05:00
Andrei Kurushin
06c68052b4
fix missed static array specifier
2017-01-22 13:39:10 -05:00
arvidn
c239c2bdc4
factor out storage_piece_set into its own file
2017-01-22 09:29:52 -05:00
arvidn
d03540e3b3
move disk_job_fence to its own file
2017-01-22 01:20:27 -05:00
arvidn
61c057947c
add typedefs for shared_ptr and make_shared, to make transition to 1.2 easier
2017-01-21 23:10:33 -05:00
Arvid Norberg
6a701437b6
use strong_typedef for peer_class_t type ( #1595 )
...
use strong_typedef for peer_class_t type
2017-01-21 22:40:19 -05:00
arvidn
3763a47846
fix truncation of peer_class field in torrent
2017-01-21 18:49:48 -05:00
arvidn
173951ec7f
merged RC_1_1 into master
2017-01-21 02:28:29 -05:00
arvidn
6d17f0fb66
storage optimization to peer classes
2017-01-21 01:23:07 -05:00
Alden Torres
c4c80b59d5
created numeric_cast<> and using it in stack_allocator
2017-01-20 20:52:16 -05:00
arvidn
202386dd9d
factor out verify_resume_data to storage_utils
2017-01-20 01:36:03 -05:00
Andrei Kurushin
393e705d5c
refactor entry::dictionary_type ( #1568 )
...
consolidate conditional std::map string code
enable C++14 string_view std::map for VS2015
2017-01-19 18:08:39 -05:00
arvidn
e98dd14760
factor out delete_files function into storage_utils
2017-01-18 00:56:01 -05:00
Alden Torres
c33af5a552
added dht_invalid_find_node counter metric
2017-01-18 00:55:32 -05:00
Alden Torres
ef9d1ecd7f
fixing sign-conversion warnings, part 6
2017-01-17 20:51:26 -05:00
Arvid Norberg
ec37436d49
factor out move_storage function to storage_utils.cpp ( #1571 )
2017-01-17 08:02:44 -05:00
Alden Torres
a5825c0d2e
fixing sign-conversion warnings, part 5, minor refactor ( #1559 )
...
fixing sign-conversion warnings, part 5, minor refactor
2017-01-16 21:51:49 -05:00
arvidn
5736237a63
fix error handling in random.cpp and fix accidental openssl dependency
2017-01-16 21:33:57 -05:00
Falcosc
a07ffe42f8
fix torrent peer class index overflow ( #1557 )
...
fix peer class index width
2017-01-16 18:20:43 -05:00
arvidn
3b9c65daf1
remove unused function, has_interface()
2017-01-16 15:14:47 -05:00
arvidn
0c189e08b5
use /dev/random as random number source on macOS
2017-01-15 12:18:08 -05:00
Arvid Norberg
04589f3bef
don't load user_agent and peer_fingerprint from session_state ( #1538 )
...
don't load user_agent and peer_fingerprint from session_state
2017-01-15 01:21:52 -05:00
arvidn
934c58a816
merged RC_1_1 into master
2017-01-15 00:45:17 -05:00
Alden Torres
df6cb6a48d
fixing sign-conversion warnings, part 4, minor refactor ( #1549 )
...
fixing sign-conversion warnings, part 4, minor refactor
2017-01-14 18:53:25 -05:00
Falcosc
564fbea065
Docu for deprecated ( #1551 )
...
documentation for deprecated members
2017-01-14 12:58:44 -05:00
Falco
51aa8e6928
documentation for deprecated members
2017-01-14 09:18:32 -05:00
Alden Torres
c3d9614dfb
minor code refactor and cleanup
2017-01-14 06:59:44 -05:00
Alden Torres
1874a917b0
added std:: prefix, end of file cleanup, formatting, consts
2017-01-14 05:59:26 -05:00
arvidn
07d45329ea
fix stats_metric enum to end up in documentation
2017-01-13 17:37:37 -05:00
Falcosc
9199756a27
fix bitfield m_buf null pointer ( #1526 )
...
fix operations on empty bitfield
2017-01-13 17:08:54 -05:00
Alden Torres
a31ba7972d
fixing sign-conversion warnings, part 3 ( #1537 )
...
fixing sign-conversion warnings, part 3. making aux::vector index type default to int
2017-01-13 01:55:29 -05:00
Alden Torres
7ac2805c2c
added custom resize methods to aux::vector ( #1514 )
...
added custom resize methods to aux::vector, code refactor
2017-01-12 18:40:59 -05:00
Arvid Norberg
3d06371f31
factor out some common storage utilities out of storage.cpp ( #1515 )
...
factor out some common storage utilities out of storage.cpp
2017-01-11 00:42:10 -05:00
arvidn
d6a7c7d991
fix error in accounting of IP overhead
2017-01-11 00:02:18 -05:00
Alden Torres
3b4867046f
fixing sign-conversion warnings, part 2
2017-01-10 20:19:03 -05:00
arvidn
d1ea80c2c3
remove disk-access-log build configuration
2017-01-09 08:37:02 -05:00
Alden Torres
0f7a55cb8b
fixing sign-conversion warnings, part 1 ( #1503 )
...
fixing sign-conversion warnings, part 1
2017-01-09 01:43:57 -05:00
arvidn
1d1ab4f4b5
removed file-leak code, temporarily used to trouble-shoot files appearing to be left open
2017-01-09 01:43:15 -05:00
Arvid Norberg
1cf3689578
simplify disk thread a little bit ( #1504 )
...
simplify disk thread a little bit
2017-01-08 19:22:59 -05:00
Andrei Kurushin
224db08997
fix frequent dealloc/alloc for utp socket lists ( #1496 )
...
fix frequent dealloc/alloc for utp socket lists
2017-01-08 19:18:26 -05:00
Andrei Kurushin
78bacfe7c1
fix various build options
2017-01-07 10:49:42 -05:00
Andrei Kurushin
ff8345101e
consolidate windows crypto provider implementation into single header ( #1495 )
...
consolidate windows crypto provider into single header
2017-01-07 01:53:39 -05:00
Arvid Norberg
57f52adc88
various cleanup ( #1497 )
...
* various cleanup
* fix
* cleanup
2017-01-06 01:39:01 -05:00
arvidn
41dbb47123
compact block_cache_reference by using storage_index_t instead of pointer. make sure storage object is kept alive by block_cache_references
2017-01-02 13:45:16 -05:00
arvidn
4ebc344e48
make disk_io_thread responsible for the storage object. torrents refer to it by index
2017-01-01 13:54:39 -05:00
arvidn
9007c8333f
merge RC_1_1 into master
2017-01-01 11:08:57 -05:00
arvidn
1600d4dca5
clean up file pool a bit
2017-01-01 09:56:50 -05:00
arvidn
005d1a47b0
deprecate dont_flush_write_cache setting
2016-12-31 17:44:57 -05:00
arvidn
23a7e8d40a
hide the block_cache_reference from disk_buffer_holder
2016-12-31 10:31:54 -05:00
arvidn
59b322bc79
merged RC_1_1 into master
2016-12-29 08:54:28 -08:00
arvidn
5a97af54db
optimize chained buffer a bit and factor out nop into non_owning_handle
2016-12-29 07:05:18 -08:00
Pavel Pimenov
98cdc3192d
Missing member init ( #1467 )
...
initialize members of piece_block and use default member initialization.
2016-12-29 06:55:58 -08:00
Arvid Norberg
af126fe507
make buffer_allocator_interface an implementation detail of the disk_io_thread ( #1463 )
...
make buffer_allocator_interface an implementation detail of the disk_io_thread by using disk_buffer_holder in the disk interface. make chained_buffer use holders instead of free deleter functions and userdata to support putting disk_buffer_holder objects in there. Also make the session buffers be held by holders
2016-12-28 17:47:18 -08:00
Pavel Pimenov
516e86d0ea
Refactoring routing_table ( #1468 )
...
routing_table refactor. ip_set::count -> ip_set::exists. Fix copy-paste routing_table::remove_node
2016-12-28 14:40:56 -08:00
Andrei Kurushin
e10edb5e0b
move LoadLibrary logic to new win_util module ( #1464 )
...
move LoadLibrary logic to new win_util module. use get_library_procedure as common windows dyn proc load routine
2016-12-28 10:12:20 -08:00
Andrei Kurushin
08aab3a879
make internal sha1 & sha512 implementation declarations match libcrypto api
2016-12-27 22:30:57 -08:00
Arvid Norberg
f1e34dfbd5
remove long-standing deprecated filter_pieces functions ( #1457 )
...
remove long-standing deprecated filter_pieces functions
2016-12-27 12:42:23 -08:00
Arvid Norberg
b74bdfa7db
make dht logging deterministic ( #1460 )
...
make dht logging deterministic (ues an id instead of this-pointer to identify a traversal algorithm)
try with more DHT nodes
2016-12-27 07:12:57 -08:00
arvidn
45f3f80d86
fix windows build
2016-12-27 06:33:40 -08:00
Andrei Kurushin
1ec5c69dcd
minor code corrections ( #1430 )
...
use compact span cast. extend split_path api with only_first_part flag. use single loadlibrary and getprocaddress for IP helper
2016-12-26 22:45:48 -08:00
arvidn
2f75dcccfe
on backwards compatible set_settings(), stack allocate settings_pack
2016-12-26 22:44:42 -08:00
arvidn
192ef4962b
simplify the buffer_allocator_interface
2016-12-26 08:36:50 -08:00
arvidn
cda715c152
introduce type for slot index in part_file
2016-12-26 08:33:19 -08:00
Arvid Norberg
42a27b3ebc
introduce a prio_index_t type ( #1453 )
...
* introduce a prio_index_t type for indexing into the priority sorted piece list, m_pieces, in piece_picker
* some piece picker simplification
* fix msvc warning for prio_index_t
2016-12-26 08:25:50 -08:00
arvidn
5ed0086b51
removed mmap_cache feature
2016-12-25 21:12:49 -08:00
Pavel Pimenov
c34a2541cc
Log refactoring ( #1446 )
...
factor out common logging code in some dht traversal algorithms
2016-12-24 06:46:21 -08:00
arvidn
96c2bc7e46
modernize vector_utils.hpp
2016-12-23 17:37:44 -08:00
arvidn
3f612d7e99
cleaning up of left-overs from torrent eviction functionality
2016-12-23 06:06:59 -05:00
Alden Torres
21cf625132
swig related fix in units.hpp, swig parser needs named typename
2016-12-22 21:21:36 -05:00
Pavel Pimenov
6afb1f3e83
aux::to_hex(sha1) -> sha1.to_hex() ( #1418 )
...
generate hex strings into std::string instead of stack-allocated char arrays
2016-12-22 10:44:36 -05:00
Arvid Norberg
3f1084d63d
strengthened type safety in handling of piece and file indices ( #1409 )
...
strengthened type safety in handling of piece and file indices
2016-12-22 10:42:33 -05:00
arvidn
93f400265b
revert change to use std::time_t (mingw64 has abi issues)
2016-12-22 01:13:17 -05:00
arvidn
a2c4e7490e
merged RC_1_1 into master
2016-12-20 01:16:13 -05:00
Falcosc
8adcbdd32b
add setting urlseed_max_request_bytes to handle large web seed requests #1405 ( #1423 )
...
add setting urlseed_max_request_bytes to handle large web seed requests. change default for urlseed max request to 16MIB
2016-12-18 15:58:14 -05:00
Alden Torres
eaf99aa42b
fixed more warnings of shorten-64-to-32 and sign-compare in android ( #1425 )
...
fixed more warnings of -Wshorten-64-to-32 in android. changed file_status to use std::time and disable warnings of NLMSG_OK in clang
2016-12-18 10:59:41 -05:00
Andrei Kurushin
d62b980278
backport fix upnp xml_parse
2016-12-18 09:01:33 -05:00
Andrei Kurushin
10e3847b40
fix upnp ( #1421 )
...
* fix upnp xml_parser, and listen sockets remap
2016-12-17 17:50:03 -05:00
Alden Torres
1b808b6516
refactor in aux::write_ to avoid explicit castings ( #1426 )
...
refactor in aux::write_ to avoid explicit casts
2016-12-17 15:03:43 -05:00
Steven Siloti
916fc92c49
create separate function for reading a node from a list
2016-12-17 02:22:13 -05:00
Alden Torres
f715ebfd97
header fix and refactor in udp_tracker_connection and typos in lazy_entry
2016-12-17 02:20:29 -05:00
Alden Torres
139528aae4
code refactor in torrent.cpp for more auto loop and formatting
2016-12-17 02:12:23 -05:00
Alden Torres
22b596945e
enable /W4 warnings for msvc
2016-12-13 19:36:14 -05:00
Alden Torres
63df1a26b6
changelog note, typos and .gitignore
2016-12-13 08:11:09 -05:00