Commit Graph

1972 Commits

Author SHA1 Message Date
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
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
arvidn c56f6abf72 deliver notification of alerts being dropped via alerts_dropped_alert 2018-05-30 11:26:02 +02:00
arvidn 3b0ce8d2e1 merged RC_1_1 into master 2018-05-28 15:56:22 +02:00
arvidn 1a66a8b285 merged RC_1_1 into master 2018-05-20 12:08:46 +02:00
d_komarov 96700c15ff Set http request timeout to 5 seconds
Fixes random test failures in test_http_connection.
2018-05-17 00:54:12 +02:00
Eugene Shalygin a626f75c5e Refactor CMakeLists.txt
1. Replace custom 'shared' option with the standard BUILD_SHARED_LIBS
flag
2. Replace foreach() calls for source items with target_sources() and
generator expression $<JOIN:>.
3. Remove build types definition: makes no sense for
single-configuration generators, and is populated automatically for
multi-configuration ones.
4. Add feature summary
5. Enahnce compiler flags management for static runtime by utilizing functions
from the ucm project
6. Copy almost all options from the Jamfile.
7. If compiler supports C++14, use it.
8. Raise minimum required CMake version to 3.11 and drop bundled FindIconv.cmake
2018-05-14 09:08:19 +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 c98b700d4f merged RC_1_1 2018-05-10 22:48:39 +02:00
arvidn a2c6136f44 add round-trip test to create_torrent 2018-05-10 19:04:26 +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
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
Eugene Shalygin 049e918295 build python bindings with cmake 2018-04-29 19:48:26 +02:00
arvidn 8621477239 merged RC_1_1 into master 2018-04-28 14:36:24 +02: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
Arvid Norberg d8c022070f merged RC_1_1 into master 2018-04-21 17:17:55 -04: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 f0227451a6 merged RC_1_1 into master 2018-04-13 01:47:41 +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 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
Arvid Norberg 6efff919cd deprecated alert::progress_notification alert category, split into finer grained categories 2018-04-05 16:27:28 +02:00
arvidn 32b2de8f17 merged RC_1_1 into master 2018-04-04 20:48:07 +02:00
Arvid Norberg 77e473f35b fix ~peer_server() to not throw 2018-04-03 13:44:58 +02:00
Alden Torres 5b922072e9 avoid calls to .address() when looking for endpoint protocol (#2892)
using is_v4 and is_v6 where possible
2018-04-01 13:48:17 +02:00
arvidn d080c6f532 merged RC_1_1 into master 2018-03-26 12:56:25 +02:00
d_komarov 1c867a5026 Changing file priorities while checking interrupts checking.
Also, if the last file has zero priority, checking is interrupted prematurely.
2018-03-26 02:59:10 +02:00
arvidn 3171245292 fix warnings 2018-03-24 23:01:19 +01:00
arvidn 5413eae900 declare tag types in-line 2018-03-23 11:21:08 +01:00
arvidn 9df4d4b7f8 replace typedef with using. replace NULL with nullptr. cleanup page_aligned_allocator 2018-03-23 11:19:46 +01:00
Steven Siloti e08ec99132 cmake: restore change to make test_common a propper library
This was originally done in 87832ce706 but
it got clobbered by a merge from RC_1_1.
2018-03-21 21:40:29 +01:00
arvidn 4e04e6993d boost::int64_t -> std::int64_t 2018-03-15 08:53:17 +01:00
arvidn 8658fb5f7c deprecate the error_file_* constants whose underlying features have been deprecated 2018-03-13 19:39:55 +01:00
arvidn 5c1b65e9b8 merged RC_1_1 into master 2018-03-12 02:32:12 +01:00
arvidn a06e4f696b track whether a file is eligible for using the partfile on a per-file basis. This is intended to improve backwards compatibility, to better support resuming files downloaded with older versions of libtorrent 2018-03-11 12:52:56 +01:00
arvidn 9696082355 merged RC_1_1 into master 2018-02-25 09:36:12 +01:00
arvidn 24dea1f845 fix tie-break in duplicate peer connection disconnect logic 2018-02-21 21:04:28 +01:00
d-komarov 3acc5732a2 Add file test workaround (#2804)
File test compiled with TORRENT_USE_UNC_PATHS produces file that cannot
be removed.
2018-02-21 12:29:37 +01:00
d_komarov eb9f7c488b Minor test changes
* Fix warning in test/CMakeLists.txt
* Fix router name check in test_upnp
2018-02-21 09:20:02 +01:00
d_komarov 0ecb935d9d Fix test/CmakeLists.txt not found on Linux
* Rename test/CmakeLists.txt -> test/CMakeLists.txt
* Revert accidentally removed processing of resolve-countries option
2018-02-19 23:23:15 +01:00
d-komarov b922ea86c9 Fix some tests
* Fix test_remove_torrent fails when torrent is downloaded too quick
* Fix typo when printing session alerts
* Fix test_lsd and test_upnp on multi-homed systems
* Fix test_tracker 'connect_alert' predicate
2018-02-19 23:23:15 +01:00
d-komarov 18a4f82b5c Fix test_transfer sync of torrent stats
Evaluate torrent total blocks count only once. Equalize synchronization
of 'disk.disk_blocks_in_use' check used to break cycle with TEST_CHECK
statement. This makes tests that refer to web seeds execute much faster.
2018-02-19 23:23:15 +01:00
d-komarov 41b3d437de Fix and improve setup_transfer
Numerous issues cause test fails on Windows(and Linux?). Most of them
found in print_alerts procedure.

Make print_alerts predicate check short-circuit, i.e. exit early on
first match. Fixes cases when appropriate variable may be re-assigned
multiple times with incorrect values.

Make stop_process wait until actual process successfully terminates.
This change is applicable to Windows only and helps to avoid tests
cleanup errors.

Make stop_proxy procedure do what it suppose to do. Previously it was
doing nothing with intention that all proxies are stopped after test
completion. Under Windows there are problems with proxy that has it's
socket connection abandoned. Thus failing the rest of test cases.

* Fix stop_all_proxies map using incorrect key to erase elements
* Fix wait_for_alert case with negative 'num'
* Make print_alerts predicate const& to avoid extra copy
* Make listen_alert and downloading_alert predicate procs reentrant
2018-02-19 23:23:15 +01:00
d-komarov 22e9370cb6 Fix exception when calling dup2 with -1 2018-02-19 23:23:15 +01:00