Arvid Norberg
eec34e3ac3
fix issue with SSL tracker connections left in CLOSE_WAIT state ( #2797 )
2018-02-20 08:40:47 +01:00
d-komarov
f94b62acf7
CMake improvements
...
CMake build scripts improved to simplify configuring and building of
project and tests.
Better use of compile definitions by replacing add_definitions with
target_compile_definitions. Use INTERFACE, PUBLIC and PRIVATE keywords
to separate scope of TORRENT_BUILDING_SHARED and TORRENT_LINKING_SHARED
definitions.
* Move tests to the separate file - test/CmakeLists.txt
* Fix use of compile definitions
* Remove redundant tailqueue.cpp
2018-02-19 23:23:15 +01:00
Alden Torres
421709f67f
added friendly_name and description to ip_interface ( #2799 )
2018-02-19 11:46:35 +01:00
arvidn
1ede34da8a
undo the patch to restore incoming TCP connections over SOCKS5
2018-02-19 00:01:42 +01:00
arvidn
f8fb5c2294
merged RC_1_1 into master
2018-02-10 22:52:12 +01:00
arvidn
a1860426b8
defer truncating existing files until the first time we write to them
2018-02-10 18:33:41 +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
a0a63341c7
fix haiku build
2018-02-04 19:10:43 +01:00
Alden Torres
3261eea63a
more use of emplace and minor code refactor in bt_peer_connection.cpp
2018-02-02 21:53:48 +01:00
Alden Torres
fe9883ea27
avoid endianness test in peer_priority function
2018-01-31 22:49:25 +01:00
arvidn
91e03c789c
fix issue resuming 1.0.x downloads with a file priority 0
2018-01-31 22:43:07 +01:00
Alden Torres
5d230a69f2
minor code cleanup
2018-01-30 12:38:08 +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
720bfa54cd
merged RC_1_1 into master
2018-01-29 01:20:08 +01:00
arvidn
b729021625
make coalesce-buffers work on windows and systemps with pwritev()/preadv()
2018-01-28 23:05:01 +01:00
arvidn
a50579c651
merged RC_1_1 into master
2018-01-27 09:41:54 +01:00
Alden Torres
084e980d52
avoid repeated calls to .address(), minor refactor
2018-01-27 09:22:38 +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
308cbfe097
merged RC_1_1 into master
2018-01-27 02:36:55 +01:00
arvidn
bc4d53c71f
restore support for incoming connections over SOCKS5 (disabled by default)
2018-01-25 09:14:14 +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
89c6f0b4a8
merged RC_1_1 into master
2018-01-21 15:51:22 +01:00
arvidn
ed7ef8fdd6
minor cleanups in some extensions
2018-01-19 20:02:17 +01:00
arvidn
0ee6b7d142
build for iOS on travis
2018-01-18 22:37:37 +01:00
arvidn
785fffd976
make url_random take a span
2018-01-15 01:49:42 -05:00
arvidn
a01274ce2c
broadcast socket handler take a span
2018-01-14 20:21:42 -05:00
arvidn
e829c1942a
merged RC_1_1 into master
2018-01-14 13:07:20 +01:00
arvidn
a67eb2f059
fix tracker connection bind issue for IPv6 trackers
2018-01-14 06:47:13 -05:00
arvidn
a9085db760
fix error handling of merkle torrents
2018-01-13 17:33:36 -05:00
arvidn
f29bb69612
fix error handling of unsupported hard-links
2018-01-13 08:36:48 -05: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
Steven Siloti
5f25912694
remove unused infohash member in create_torrent
2018-01-11 02:43:09 -05:00
pavel.pimenov
5a772325a0
redundant is_finished(block.block)
2018-01-09 03:20:28 -05:00
pavel.pimenov
3f23ef59c6
small opt torrent::add_piece
2018-01-09 03:20:07 -05:00
arvidn
a93429c5db
modernize piece-size selection in torrent creator and add a test
2018-01-09 03:19:44 -05:00
arvidn
ad82be145b
merged RC_1_1 into master
2018-01-08 22:52:23 +01:00
Chocobo1
1877724c17
raise auto piece size selection limit to 16 MB in create_torrent()
...
16 MB is chosen to have a bit more future proof
Also rewrite the auto piece size selection algorithm, so that it will scale with
torrent content size, suggested by @ssiloti.
2018-01-08 15:24:47 -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
Pavel Pimenov
97ceeab9e3
fix V821 Decreased performance. ( #2675 )
...
The 't' variable can be constructed in a lower level scope
2018-01-07 20:37:21 -05:00
pavel.pimenov
3e29968a92
remove duplicate if (files.num_files() == 0)
2018-01-07 14:00:59 -05:00
arvidn
39144201db
mark up performance counter operations as noexcept
2018-01-06 20:12:41 -05:00
arvidn
88643dd121
fix m_in_constructor assert for peer_connection (if the peer connection is constructed, but bt_peer_connection constructor fails, it needs to be cleared). Fix an invariant in session on ungraceful shutdown. Make test framework a bit more robust
2018-01-06 14:29:20 -05:00
pavel.pimenov
bad0f01e07
remove #include boost/multiprecision
2018-01-06 09:24:48 -05:00
arvidn
fac9931eb6
fix noexcept marking on entry, and make move assignment
2018-01-04 19:34:42 -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
c8bf782bd0
bump version number to 1.1.6
2017-12-29 15:53:51 +01: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
c3bdc6f825
use an intrusive linked list for peer_cache_entry instead an unordered set, to avoid heap allocations and make cache operations not able to fail. This simplifies error handling
2017-12-28 00:52:09 +01:00
arvidn
a9753d3bdc
merge RC_1_1 into master
2017-12-27 22:16:14 +01:00
arvidn
c1abafc0cc
reserve space in the undead peers list up-front, to not have to allocate memory when disconnecting
2017-12-27 21:24:16 +01:00
arvidn
5ebd05b047
handle serious errors in on_accept_connection handler
2017-12-27 21:23:25 +01:00
arvidn
1884061418
revert redundant wrapping some function calls with error handlers. Error handling is already built into the handler allocator
2017-12-27 21:22:34 +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
ab9fcdf029
reserve space in torrent lists up-front, to make transitioning list membership unable to fail
2017-12-27 15:42:46 +01:00
arvidn
7ea5946305
remove some last lexical_cast residual
2017-12-27 12:44:36 +01:00
arvidn
347555ea8f
handle errors in peer_connection
2017-12-26 10:39:54 +01:00
arvidn
3971897c14
remove invalid assert
2017-12-24 11:28:02 +01:00
arvidn
40292a1d51
don't heap-allocate handlers for incoming UDP packets
2017-12-24 11:22:30 +01:00
arvidn
753826cbb8
merger RC_1_1 into master
2017-12-23 18:15:01 +01:00
arvidn
43d7f980d0
make the chunk header parser properly fail at end of buffer, and not require zero terminated strings
2017-12-23 17:06:50 +01:00
arvidn
b5d4bc5e62
back-port path fixup in file_storage add_file
2017-12-23 12:02:17 +01:00
arvidn
47709244d3
back-port fixed assert in chunk parser
2017-12-23 12:01:40 +01:00
arvidn
62bf524e75
disable DHT logging with the TORRENT_DISABLE_LOGGING macros as well
2017-12-23 12:01:18 +01:00
arvidn
b7decd452e
add getters for peer_class_filter and peer_class_type_filter
2017-12-23 09:25:06 +01:00
arvidn
67be35739c
:attempt to fix disconnections when torrents enter upload mode due to failures
2017-12-23 09:24:26 +01:00
sledgehammer_999
94f4e88e05
Fix local network address mappings.
2017-12-20 11:28:36 +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
0848d9b7f5
change defaults for rate_limit_utp setting
2017-12-17 08:50:25 +01:00
arvidn
96bf0ad5de
fix reopening of listen sockets when disabling force-proxy
2017-12-17 08:25:51 +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
arvidn
ba224a1577
restore the parse_magnet_uri overload that amends an add_torrent_params object
2017-12-14 12:20:02 +01:00
Steven Siloti
9e0a3aead1
use info hash from params instead of passing it separately
2017-12-14 10:18:33 +01:00
arvidn
7b06a5ee6e
merged RC_1_1 into master
2017-12-13 12:36:35 +01:00
arvidn
86c83fe976
fix asio debugging
2017-12-12 10:11:09 -05:00
arvidn
fe6473039c
fix rate limit utp feature
2017-12-11 08:40:35 -05:00
arvidn
b00b3184c0
some minor i2p cleanups
2017-12-08 09:57:21 +01:00
arvidn
a286b9da47
fix i2p support
2017-12-08 09:57:21 +01:00
arvidn
c4cf7ebae6
Merge branch 'master' of https://github.com/arvidn/libtorrent
2017-12-07 18:31:26 +01:00
arvidn
90ccd5180f
merged RC_1_1 into master
2017-12-07 18:31:16 +01:00
Alden Torres
db61d9cc20
minor cleanup, refactor and typos ( #2593 )
2017-12-07 07:51:55 +01:00
arvidn
f81a20a035
fix loading resume data when in seed mode
2017-12-03 23:43:55 +01:00
arvidn
0fe2e85fee
fix part-file creation race condition (back-port from master)
2017-12-03 18:13:54 +01:00
arvidn
c16eb32b94
merge RC_1_1 into master
2017-12-03 18:12:35 +01:00
arvidn
c745d3f00d
fix incorrect use of make_tick_handler
2017-12-02 12:20:36 +01:00
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
Alden Torres
af6b54ed78
more use of const, auto loop, cleanup in escape_string.cpp
2017-11-30 18:12:21 +01:00
Alden Torres
7fe75dd1eb
trivial code refactor in entry and string_util related code
2017-11-29 20:08:15 +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
Alden Torres
f2681412e7
more use of const in peer_connection.cpp and minor code refactor
2017-11-28 09:45:40 +01:00
Alden Torres
e0dee20f3e
more use of emplace_back in torrent_info.cpp and minor general refactor
2017-11-27 20:12:23 +01:00
Arvid Norberg
e15f466137
fix issue with receiving interested before metadata ( #2557 )
2017-11-25 15:31:37 +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
Alden Torres
f73473a6ec
don't early move shared_ptr plugin in torrent::add_extension_fun, added test for it
2017-11-23 08:00:08 +01:00
Alden Torres
59fe15eb84
more use of emplace_back in torrent.cpp
2017-11-23 07:52:50 +01:00
arvidn
d8ea7fc5eb
merged RC_1_1 into master
2017-11-23 01:17:43 +01:00
arvidn
1593916e62
fix ipv6 udp tracker test
2017-11-23 00:05:08 +01:00
arvidn
a57ad00e15
fix force-proxy regression (udp sockets would not be opened)
2017-11-21 08:54:16 +01:00
arvidn
04c2c35f8d
restore path sanitization behavior of ':'
2017-11-21 08:50:09 +01:00
arvidn
22f8bdfebc
merge RC_1_1 into master
2017-11-21 00:50:02 +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
096ce54fae
fix issue where new listen sockets would not be opened when leaving force_proxy mode
2017-11-14 12:38:22 +01:00
arvidn
2dc0204261
fix backwards compatibility in deprecated parse_magnet_uri
2017-11-13 15:38:08 +01:00
arvidn
521587c026
make sure the cork destructor doesn't leak exceptions
2017-11-12 23:03:54 +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
d00451994b
stop posting alerts when the session is shutting down. Nobody will be able to see them anyway. It also solves some issues around destruction order where posting alerts require certain things to still be around in the session_impl object
2017-11-12 09:12:59 +01:00
Alden Torres
c771f16c5c
lint guided refactor in dht source code ( #2516 )
2017-11-12 00:50:24 +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
arvidn
d4864b8b18
some noexcept fixes
2017-11-10 09:05:15 +01:00
arvidn
1ed68551d7
merged RC_1_1 into master
2017-11-10 01:37:35 +01:00
Pavel Pimenov
8ac6bbe553
add http_parser::header_int ( #2472 )
2017-11-09 23:43:26 +01:00
pavel.pimenov
21eb9f782c
opt call is_finished()
2017-11-09 20:52:48 +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
Col-blimp
b0c101a475
Update identify_client.cpp
2017-11-08 23:04:15 +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