Commit Graph

9360 Commits

Author SHA1 Message Date
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
d-komarov 59bdb3db81 Fix compilation warning at friend declarations
Use appropriate dllimport/dllexport attributes with friend declarations.
2018-02-19 23:23:15 +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
arvidn 1ede34da8a undo the patch to restore incoming TCP connections over SOCKS5 2018-02-19 00:01:42 +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
arvidn 91e03c789c fix issue resuming 1.0.x downloads with a file priority 0 2018-01-31 22:43:07 +01:00
arvidn 01c41fadcf fix torrent_status::next_announce 2018-01-29 15:08:18 +01:00
arvidn ca3ea591df fix pad-file scalability issue 2018-01-29 03:00:37 +01:00
arvidn b729021625 make coalesce-buffers work on windows and systemps with pwritev()/preadv() 2018-01-28 23:05:01 +01:00
arvidn eeca133dd7 fix alert_mask in bt-get.cpp 2018-01-28 08:38:40 +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 cc93f8f3a7 add switch to create pad files in test torrents in connection-tester 2018-01-27 09:17:23 +01:00
arvidn 5b83085406 fix openssl download links in appveyor script 2018-01-27 09:15:20 +01:00
arvidn bc4d53c71f restore support for incoming connections over SOCKS5 (disabled by default) 2018-01-25 09:14:14 +01:00
arvidn 2a4f056900 update documentation 2018-01-23 19:30:41 +01:00
arvidn efd096d879 use unique peer_ids per connection 2018-01-23 16:40:16 +01:00
arvidn 7ff9f79af3 run fewer osx jobs on travis 2018-01-23 16:33:13 +01:00
arvidn 0ee6b7d142 build for iOS on travis 2018-01-18 22:37:37 +01:00
arvidn e6eb31cfe1 minor documentation update 2018-01-15 01:06:28 +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
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 7141542591 update libsimulator with boost-1.66 fix 2018-01-01 20:23:59 -05:00
arvidn b45acf28a5 improve fwd.hpp generator 2017-12-31 11:44:14 +01:00
arvidn e4ac70c98b update boost.asio link in documentation, minor cleanup of tutorial examples 2017-12-30 21:23:36 +01:00
arvidn f9968e1e90 refresh fwd.hpp 2017-12-30 21:04:06 +01:00
arvidn f4eaf3dba4 add note about dynamic loading/unloading of torrents 2017-12-30 20:57:43 +01:00
arvidn d427572247 cleanup examples a bit 2017-12-30 02:57:43 +01:00
arvidn 4565a2f375 update documentation 2017-12-29 20:03:40 +01:00
arvidn c8bf782bd0 bump version number to 1.1.6 2017-12-29 15:53:51 +01:00
arvidn 473b86a8e6 cleanup tarball build script 2017-12-29 10:50:48 +01:00
arvidn a46bd839f0 clean makefile dependency directory in clean.py script 2017-12-29 10:16:15 +01:00
arvidn edb5674d5c Revert "Autotools: Check if std::chrono and std::random are available."
This reverts commit d93869ff3b.
2017-12-29 10:15:59 +01:00
arvidn 00a36608b9 fix some typos 2017-12-29 02:29:42 +01:00
arvidn 69ff30f50f deprecate save_encryption_settings (they are part of the normal settings) 2017-12-27 13:39:36 +01:00
arvidn 7ea5946305 remove some last lexical_cast residual 2017-12-27 12:44:36 +01:00
arvidn 3971897c14 remove invalid assert 2017-12-24 11:28:02 +01:00
sledgehammer_999 d93869ff3b Autotools: Check if std::chrono and std::random are available.
If yes, don't even try to find their Boost equivalents.
2017-12-24 11:27:21 +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
arvidn 0aef2c2846 don't build coo98 on osx, since brew boost uses 1.66 which requires C++11 2017-12-22 23:06:05 +01:00
sledgehammer_999 94f4e88e05 Fix local network address mappings. 2017-12-20 11:28:36 +01:00
arvidn 178281e1c5 make torrent_handler::set_priority() to use peer_classes 2017-12-18 00:56:44 +01:00