Commit Graph

4267 Commits

Author SHA1 Message Date
Steven Siloti e523566622 add support for the Port Control Protocol (PCP) 2018-06-07 18:18:31 -07:00
Steven Siloti 78be52112f create a natpmp instance for each listen socket 2018-06-07 18:16:08 -07:00
Arvid Norberg e88339378c merged RC_1_1 into master 2018-06-07 00:30:23 +02:00
Arvid Norberg 2408200475 fix race condition in stat_cache 2018-06-05 19:07:33 +02:00
Arvid Norberg 794ccf4f79 remove unused disk stats counters 2018-06-05 19:03:04 +02:00
arvidn 95cfc16bca fix integer overflow in alert_manager 2018-06-02 15:16:08 +02:00
arvidn 267ca40b28 merged RC_1_1 into master 2018-06-02 13:15:13 +02:00
arvidn c55bc7dd42 improve error handling of failing to change file priority 2018-05-31 00:47:17 +02:00
Alden Torres 8a0ac58658 some lint oriented refactor, more use of const 2018-05-30 23:52:28 +02:00
arvidn c56f6abf72 deliver notification of alerts being dropped via alerts_dropped_alert 2018-05-30 11:26:02 +02:00
Alden Torres 6c4869f044 moved instantiate_connection to aux namespace 2018-05-29 09:25:25 +02:00
Steven Siloti 396c5dd3af remove use of deprecated function readdir_r
Ports 140b8ace onto RC_1_1 branch
2018-05-28 16:06:41 +02:00
arvidn 3b0ce8d2e1 merged RC_1_1 into master 2018-05-28 15:56:22 +02:00
arvidn 35d7672432 raise priority of fastresum_rejected_alert 2018-05-27 22:33:24 +02:00
Alden Torres d6cecee8c0 some code cleanup and minor refactor 2018-05-24 23:46:37 +02:00
arvidn 534276e7a5 refactor to use the utility function for bind_socket_to_device() instead of using the bind_to_device socket option directly, to make it best effort. include operation enum in udp_error alert. 2018-05-23 12:11:04 +02:00
Alden Torres ff300ed224 some cleanup and refactor in torrent_info code (#3054) 2018-05-23 10:39:55 +02:00
arvidn 1a66a8b285 merged RC_1_1 into master 2018-05-20 12:08:46 +02:00
arvidn a137bbfdd4 simplify some using statements to pull in the address types 2018-05-20 08:46:14 +02:00
d_komarov 5f74b6e353 Bump `file_error_alert` priority
This alert's priority must be higher than `block_downloading_alert`'s
to allow custom handling of file errors.

With progress notifications enabled, network thread might fully load
alerts queue, so file errors from disk thread won't have a chance to
be delivered.
2018-05-17 00:55:07 +02:00
Alden Torres a7b2026ef8 minor code refactor in ip_filter code 2018-05-14 23:58:01 +02:00
Arvid Norberg ccdfd7383e move export.hpp into aux_ folder. put assert symbols in libtorrent namespace 2018-05-14 09:09:01 +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
Arvid Norberg 4523e05527 fix uTP and SOCKS5 simulations and update libsimulator 2018-05-13 12:10:34 +02:00
d-komarov f052d1ca40 Fix bandwidth allocation (#2810)
Don't allow peer connection to ask quota from bandwidth manager if send buffer is empty.
Remove undefined member function
Update download rate multiplier
2018-05-12 13:53:03 +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
Arvid Norberg c98b700d4f merged RC_1_1 2018-05-10 22:48:39 +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
arvidn 5f758b8531 remove redundant set_piece_hashes template. take a std::function instead 2018-05-10 12:10:33 +02:00
Eugene Shalygin 81fd09775c Fix compilation with GCC 8 2018-05-07 13:33:18 +02:00
d-komarov dc28c96559 Fix unit tests build
Export `recursive_mutex` because `emplace_alert` template injects
dependency on that type during instatiation.
2018-05-07 00:53:48 +02:00
Arvid Norberg 894933e1f1 fix typo in comment 2018-05-06 20:59:32 +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
Arvid Norberg 26b0487f0b merged RC_1_1 into master 2018-05-01 21:26:42 +02:00
d-komarov 785f173df3 Revise alert priorities / torrent::on_resume_data_checked issue (#2962)
Most status alerts should have priorities above normal level. Good reason for this is resume data verification case. For a large torrent(having lots of pieces) whole alert queue will be overflowed
with a `piece_finished_alert` right after resume data has been verified. Thus alerts like `torrent_checked_alert`, `torrent_finished`, `state_changed_alert` will not go the alerts queue.
* Introduce alert_priority enumeration
* Bump state_changed_alert's priority
* Set dht_direct_response_alert priority to `critical`
2018-05-01 12:26:37 +02:00
arvidn 33bf3c827f fix deprecation markups 2018-04-28 22:47:38 +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
pavel.pimenov 2a97ec6e0e Windows: Fix build Visual C++ ARM/ARM64 2018-04-25 16:07:47 -04:00
Alden Torres 83dd6c9c53 cleanup and refactor in storage source code 2018-04-25 16:02:30 -04:00
Chocobo1 6394e7ac02 Fix MSVC warning C4267 by casting to the correct type explictly 2018-04-24 23:16:54 -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
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
arvidn f0227451a6 merged RC_1_1 into master 2018-04-13 01:47:41 +02:00
arvidn 64d6b49004 fix boost-1.67 build 2018-04-12 14:33:46 +02:00