Arvid Norberg
17055ad4d1
don't enable reuse-address for UDP sockets, as it will always succeed and not get any incoming packets. It's better to detect a port conflict and try a different port. Also implement port-retry logic for the UDP sockets
2018-05-13 22:36:02 +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
8bb1cd2b46
merged RC_1_1 into master
2018-05-12 15:37:53 +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
arvidn
4d17e0132e
fix empty outgoing interfaces for 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
Steven Siloti
96d215a32a
only allow pinged nodes into the routing table ( #3006 )
...
This is an attempt to prevent bogus nodes entering the routing table and
being propogated to other nodes.
2018-05-08 12:47:29 +02:00
Eugene Shalygin
81fd09775c
Fix compilation with GCC 8
2018-05-07 13:33:18 +02:00
Arvid Norberg
4b368e1cfc
merged RC_1_1 into master
2018-05-02 01:57:41 +02:00
arvidn
8808eb7cdd
introduce a recursive mutex to protect the alert_manager, and hold the mutex while calling user callbacks and plugin hooks. This is required to ensure the underlying storage for alert allocations (in the stack allocators) is synchronized with the thread that may be accessing it
2018-05-01 23:17:51 +02:00
Alden Torres
8da635d1f5
minor code cleanup, more use of const
2018-05-01 23:03:29 +02:00
Alden Torres
377e800e72
fixed conversion warnings in 32 bits
2018-04-30 23:09:00 +02:00
Steven Siloti
ec18742f8e
save the number of idle threads locally in disk_io_thread_pool::thread_active
...
This cuts down on the number of atomic loads while also being more correct.
Before it was possible for m_num_idle_threads to increase before its value
could be stored in m_min_idle_threads.
2018-04-29 16:31:18 +02:00
arvidn
8621477239
merged RC_1_1 into master
2018-04-28 14:36:24 +02:00
Steven Siloti
f5e33932d2
fix use after free in flush_range and flush_iovec
...
Calling blocks_flushed can cause the piece entry to be freed so its
callers need to be aware of that and avoid dereferencing the pointer if
the entry is freed.
2018-04-27 16:15:19 +02:00
Arvid Norberg
366b7983d1
fix typo with bind_outgoing_socket~
2018-04-26 19:50:25 -04:00
pavel.pimenov
2a97ec6e0e
Windows: Fix build Visual C++ ARM/ARM64
2018-04-25 16:07:47 -04:00
Alden Torres
0ec66e9024
fix disk_io_thread::do_check_fastresume storage initialize logic from RC_1_1 merge
2018-04-25 16:04:20 -04:00
Alden Torres
83dd6c9c53
cleanup and refactor in storage source code
2018-04-25 16:02:30 -04:00
Arvid Norberg
b4d2281e53
honor torrent abort even on file check error
2018-04-24 23:14:48 -04:00
Xiyue Deng
21d8e9e26b
Add missing header <cstdarg> for va_list.
...
* Fix building on OpenBSD.
2018-04-24 23:09:25 -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
d34973def9
minor code cleanup in disk buffer code
2018-04-21 23:48:40 -04:00
Arvid Norberg
d8c022070f
merged RC_1_1 into master
2018-04-21 17:17:55 -04:00
TheOriginalWinCat
bcb9e4546f
Use settings_pack::urlseed_wait_retry for default retry with http seeds. ( #2948 )
...
Update documentation
2018-04-21 18:36:56 +02:00
d-komarov
44479bcca3
Fix storage initialization ( #2944 )
...
If `default_storage::has_any_file` fails during fastresume data check, `piece_manager::check_no_fastresume` will skip storage initialization. In such case, any storage operation that require part file will cause an application crash.
2018-04-21 18:35:55 +02:00
arvidn
52e1a7b6c9
merged RC_1_1 into master
2018-04-15 11:00:57 +02:00
arvidn
9cd0ae67e7
another boost-1.67 build fix
2018-04-13 14:43:41 +02: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
Steven Siloti
236e0e7699
pass default constructed boost::function instead of NULL
...
Clang 6 defines NULL as nullptr which breaks implicit construction
of boost::function from NULL.
2018-04-12 14:32:31 +02:00
Alden Torres
9b1e79660f
removed unnecessary parentheses around min/max, added some const modifier ( #2926 )
2018-04-11 15:19:00 +02:00
arvidn
aaf9304a3b
update year in copyright header
2018-04-09 09:04:33 +02:00
arvidn
105934e578
bump version
2018-04-08 23:08:39 +02:00
arvidn
c5a5e084dd
:strtoll() returns LLONG_MAX if the input overflows. Handle this case properly in the http parser
2018-04-08 18:34:25 +02:00
arvidn
a7406de2b8
remove the global cache of the current time, just use clock::now() instead
2018-04-07 21:43:18 +02:00
V.G. Bulavintsev
c08a6bf430
Make SACK header to be able to take up the whole packet. Rename m_in_buf_size to m_receive_buffer_capacity
2018-04-07 18:55:14 +02:00
V.G. Bulavintsev
257f625e2e
Increase m_in_buf_size and max_packet_reorder to better handle links with high latency
2018-04-07 18:55:14 +02:00
V.G. Bulavintsev
bf2f0a9c55
Fix advertised window being counted twice in congestion check
2018-04-07 18:55:14 +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
d6edf26e11
minor code tidy
2018-04-07 00:30:36 +02:00
Alden Torres
2d9bff0877
make socket_entry buffer std::array
2018-04-06 10:04:32 +02:00
Arvid Norberg
6efff919cd
deprecated alert::progress_notification alert category, split into finer grained categories
2018-04-05 16:27:28 +02:00
gubatron
2a82bb5880
disk_io_thread abort_hash_jobs duplicate code refactor
2018-04-05 16:01:30 +02:00
Arvid Norberg
357217326d
some cleanups
2018-04-05 12:59:35 +02:00
arvidn
32b2de8f17
merged RC_1_1 into master
2018-04-04 20:48:07 +02:00
Alden Torres
0d9862a8dd
fix wrong variable name
2018-04-04 19:41:03 +02:00
Arvid Norberg
16f1deb3ec
merged RC_1_1 into master
2018-04-04 15:28:33 +02:00
Arvid Norberg
a5e0578c88
fix part-file header allocation
2018-04-03 20:46:49 +02:00
Arvid Norberg
77102102d6
simplify some for-loops in xml_parse
2018-04-03 18:45:04 +02:00