Commit Graph

1871 Commits

Author SHA1 Message Date
arvidn bdee0b563c fix suggest_read_cache setting 2020-02-02 20:16:59 +01:00
arvidn 94d90ce96f back-off tracker hostname looksups resulting in NXDOMAIN 2020-02-01 20:28:13 +01:00
Steven Siloti cc8cbcaf9d fix infinite loop when announcing
In torrent::announce_with_tracker there is a check after announcing all of
a tracker's endpoints to see if all required announces have already been sent
according to the tier settings.

	if (std::all_of(listen_socket_states.begin(), listen_socket_states.end()
		, [](announce_state const& s) { return s.done; }))
		break;

Commit ab07eceead added a check which can cause listen_socket_states to not be
populated if all endpoints for the first tracker are disabled. This causes the
early break out code above to trigger and prevent any announces from being sent.

The extra check is not in torrent::update_tracker_timer though, so if it thinks there
is at least one endpoint ready to announce it will immediately trigger another
on_tracker_announce, again, and again.

Simple fix is to move the offending check below the code which populates
listen_socket_states so the the latter will execute unconditionally.
2020-01-26 11:39:33 +01:00
Vladimir Golovnev (glassez) 4054cbbaee store stop_when_ready flag in fastresume data 2020-01-23 17:13:57 +01:00
arvidn 8be7ab559a remove outgoing udp sockets and replace with listen_socket_t 2020-01-19 08:27:33 +01:00
arvidn 4ceb2ea467 limit tracker announces and SOCKS5 connection attempts to listen_socket_t that actually can reach the target 2020-01-19 08:27:33 +01:00
arvidn d13109426a fix test_lsd to pass reliably 2020-01-18 03:20:20 +01:00
arvidn df85b31490 deprecate and remvoe broadcast_lsd setting 2020-01-16 16:02:00 +01:00
arvidn ab07eceead don't attempt sending event=stopped if event=start never succeeded 2020-01-12 14:12:23 +01:00
arvidn 7320568c3c minor cleanup of debug logging for peer_list 2020-01-11 11:22:30 +01:00
arvidn 7754f8ef1b improve logic for disable tracker-endpoint, and add debug logging 2020-01-10 16:28:15 +01:00
arvidn 96ad81f00d fix minor typo in torrent debug logging 2020-01-10 13:16:21 +01:00
arvidn 55e83e40d2 suppress future attempts to announce to a tracker from an interface with an incompatible address family 2020-01-04 23:03:17 +01:00
arvidn 68196dceae fix erroneous event=completed tracker announce when checking files 2019-12-15 11:21:46 +01:00
arvidn b5790b982b fix issue of rapid calls to file_priority() clobbering each other 2019-12-04 22:04:13 +01:00
arvidn b329d579e9 clear tracker errors on success 2019-12-02 23:36:18 +01:00
arvidn 97a79d2dba fixed restoring of trackers, comment, creation date and created-by in resume data 2019-11-25 14:21:55 +01:00
arvidn a53d090313 fix handling of torrents with too large pieces 2019-11-25 02:46:55 +01:00
arvidn 961417814b WIP: fix to be less likely to hammer web seeds 2019-09-12 16:57:07 +02:00
arvidn 9b1607a63c fix updating of is_finished torrent status, when changing piece priorities 2019-09-07 10:45:25 +02:00
arvidn af5fe587c0 fix regression in left= reporting to trackers when adding a seeding torrent 2019-08-19 13:49:25 +02:00
arvidn c9f953f487 saturate failed-bytes and redundant-bytes counters in torrent object, rather than asserting on overflow. This happens in the fuzzer, which keeps a torrent open for the entire run, causing it to max out redundant bytes 2019-07-29 21:53:16 -07:00
arvidn 7a20850632 feature to disable DHT, PEX and LSD per torrent 2019-07-20 10:20:41 -07:00
Arvid Norberg d113816ae6 fix issue where trackers from magnet links were not included in create_torrent() 2019-07-04 12:53:36 +02:00
arvidn 8506f93507 fix more warnings 2019-04-11 18:18:11 +02:00
arvidn a845afe6d9 fix warnings 2019-04-10 08:05:36 +02:00
arvidn 4473a8d0ce fix seed_mode flag 2019-02-24 10:20:20 +01:00
arvidn 7f2a78d0c9 make random_shuffle() take a range instead of two iterators. use random_bytes() instead of std::generate() and random_byte(). Remove unused hasher.hpp includes 2019-02-19 01:48:08 +01:00
Alden Torres bcda184e59 [WIP] refactor in file_progress to avoid dependency of alert_manager 2019-01-13 02:40:15 +01:00
arvidn f4f1425115 use UNC paths pervasively on windows 2019-01-12 21:00:40 +01:00
arvidn 8b067310b1 merged RC_1_1 into master 2019-01-12 00:53:45 +01:00
airium 33fa7454d0 Avoid announcing local ip to private tracker 2019-01-11 01:57:41 +01:00
arvidn 54fd03529e move variable scope into its build configuration block. prevent invariant-checks enabled and asserts disabled build. remove some redundant preprocessor ifdefs 2018-12-14 00:08:08 +01:00
arvidn 507fffe872 move where socket buffers are set up, to happen after the socket is opened. log errors in the peer's log instead of session and torrent 2018-12-02 04:03:03 +01:00
arvidn 7a51813d32 improve peer debug logging 2018-12-02 04:03:03 +01:00
arvidn 1b2832e018 convert some for-loops into std algorithms 2018-11-27 19:43:01 +01:00
arvidn 88c733ef2d attempt to fix an assert for a newly connected peer that disconnects just as we receive the metadata. disconnecting peers don't have their bitfield properly initialized, so we can't use it 2018-11-27 11:47:16 +01:00
arvidn bac57a6e69 merged RC_1_1 into master 2018-11-24 01:23:10 +01:00
airium 3406f12ab3 Include &ipv4= for private trackers 2018-11-20 13:50:22 +01:00
arvidn 0d8a5a8a44 add support for &ipv4= tracker argument 2018-11-19 09:08:16 +01:00
Alden Torres 295bcc08e5 more use of should_log in torrent.cpp 2018-11-18 21:55:35 +01:00
arvidn 5383854768 make span's and sha1_hash's index and size types signed (instead of unsigned). Specifically std::ptrdiff_t. In line with the direction of gsl span and reduce signed->unsigned casts 2018-11-16 14:06:22 +01:00
arvidn 0c76a3a0c5 require tracker_request objects be moved into queue_manager. also replace non-const reference parameter with rvalue reference 2018-11-14 17:09:04 +01:00
arvidn 13dd7cfe1e a better fix to the ssl port announce bug 2018-11-14 07:36:22 +01:00
arvidn a233d3cc28 actually fix the issue with the second tracker announce with port 0 2018-11-12 18:02:15 +01:00
pavel.pimenov 0ad3bb139d fix cppcheck 2018-11-08 13:45:41 +01:00
arvidn d0e146eb75 merged RC_1_1 into master 2018-11-01 09:48:41 +01:00
Arvid Norberg e1eb12e60f ssl listen port fix and improved tracker announce logging 2018-10-29 18:38:14 +01:00
Arvid Norberg ede7dbf0aa add LGTM badge to README and fix warnings 2018-10-19 16:28:33 +02:00
Alden Torres e2a8fbf020 cleanup of special code for valgrind 2018-09-12 07:49:11 -07:00