Commit Graph

6742 Commits

Author SHA1 Message Date
arvidn b6a73eeaaa simplify trigger_unchoke and trigger_optimistic_unchoke on session_impl, abd make them noexcept 2017-11-12 15:48:46 +01:00
arvidn 94dcd8e14b remove unused transaction id member of DHT observers 2017-11-12 15:46:33 +01:00
arvidn d00451994b stop posting alerts when the session is shutting down. Nobody will be able to see them anyway. It also solves some issues around destruction order where posting alerts require certain things to still be around in the session_impl object 2017-11-12 09:12:59 +01:00
Alden Torres c771f16c5c lint guided refactor in dht source code (#2516) 2017-11-12 00:50:24 +01:00
arvidn 1c278cc697 add API to query whether alerts have been dropped or not 2017-11-11 15:42:53 +01:00
arvidn 254f813626 factor out handler allocator and reuse it for posting deferred peer removals on torrents 2017-11-11 10:41:39 +01:00
arvidn b88c193742 fix sign conversion warning in peer_class_type_filter 2017-11-11 09:17:37 +01:00
arvidn d4864b8b18 some noexcept fixes 2017-11-10 09:05:15 +01:00
arvidn 1ed68551d7 merged RC_1_1 into master 2017-11-10 01:37:35 +01:00
Pavel Pimenov 8ac6bbe553 add http_parser::header_int (#2472) 2017-11-09 23:43:26 +01:00
pavel.pimenov 21eb9f782c opt call is_finished() 2017-11-09 20:52:48 +01:00
arvidn fc74c032f0 minor cleanup and modernization of torrent_peer 2017-11-09 15:48:27 +01:00
arvidn f41d2b5d3b move shared_ptr instead of copying them, when constructing DHT observers 2017-11-08 23:09:43 +01:00
Col-blimp b0c101a475 Update identify_client.cpp 2017-11-08 23:04:15 +01:00
arvidn 7730eea401 restore backwards compatibility with the API before download_priority_t was introduced 2017-11-06 01:24:24 +01:00
arvidn a690e6c76d add throwing overload of parse_magnet_uri 2017-11-05 20:31:06 +01:00
arvidn 6785046c2f introduce a download_priority_t type, for uniform an type-safe piece- and file priorities 2017-11-02 08:20:21 +01:00
arvidn f57b90b500 introduce type for torrent queue_position 2017-11-01 10:52:45 +01:00
Alden Torres 5480c08184 enable/disable the internal ip notifier with new setting (#2487) 2017-11-01 10:51:51 +01:00
Alden Torres f02e7514e1 fix issue of null m_part_file in default_storage readv/writev (#2490)
call need_partfile if necessary in default_storage constructor and no .reset() in release_files()
2017-10-31 16:49:58 +01:00
Roman Kalashnikov 7aa5570589 Remove twice assigned values 2017-10-30 19:13:56 +01:00
Alden Torres f040d6d860 added reopen_network_sockets method to allow manual reopen of listen/outgoing sockets (#2476) 2017-10-28 12:15:35 +02:00
Steven Siloti dc612b6423 keep updating aux::time_now() while there are announces
This fixes an infinite loop when an announce during shutown fails and
aux::time_now() has fallen behind clock_type::now() by more than the
delay calculated in announce_entry::failed(). If this happens,
announce_entry::can_announce() can forever return true when called from
torrent::announce_with_tracker() because that function uses
clock_type::now().

Also change torrent::announce_with_tracker() to use aux::time_now() just
for consistency with the reset of the announce related functions.
2017-10-26 23:42:35 +02:00
arvidn 50bef25786 make the piece-picker less two-phase initialized 2017-10-26 23:39:15 +02:00
Alden Torres ab4f140328 using NETLINK_NO_ENOBUFS to ignore ENOBUFS in netlink based ip notifier (#2475) 2017-10-26 11:15:19 +02:00
arvidn 80ac90727b remove some questionable code from disk_io_thread when deleting files for a torrent and extend transfer test to cover deleting files while seeding 2017-10-25 19:00:54 +02:00
arvidn 9e69bf3618 introduce a type to refer to a torrent-list-index, to improve type safety 2017-10-25 13:39:37 +02:00
Alden Torres b380bf8059 minor and general code cleanup/refactor 2017-10-25 09:58:47 +02:00
Alden Torres 174a2ca65f add limit of max 50 upnp mappings and recover free global mappings (#2470) 2017-10-24 16:16:22 +02:00
pavel.pimenov 989a65f18e upnp: reduce size NewPortMappingDescription 2017-10-24 12:27:46 +02:00
Alden Torres 1ce3483a9e creating part file if needed only in set_file_priorities 2017-10-24 09:56:49 +02:00
Alden Torres 7216b69188 revert early return in session_impl::on_port_mapping and only check for error if cast_vote (#2468) 2017-10-24 09:54:57 +02:00
Alden Torres 6409cb42e1 fix implicit-fallthrough warnings with gcc 7 2017-10-23 19:18:33 +02:00
Alden Torres bb409c5ee9 missing return if error in session_impl::on_port_mapping, doc typo (#2459) 2017-10-23 12:36:51 +02:00
arvidn 98effc8d88 minor disk_io_job piece_hash cleanup 2017-10-22 16:49:25 +02:00
Alden Torres 74ecf63906 close connection in upnp::on_upnp_xml and added abort/closing returns 2017-10-20 11:46:41 +02:00
arvidn 244d18dcf8 merged RC_1_1 into master 2017-10-17 09:38:51 +02:00
arvidn 205fe5e7ea fix full allocation failure on APFS 2017-10-16 00:08:10 +02:00
Alden Torres 8083a6c2bd some code indentation, one more use of nullptr and constexpr 2017-10-15 04:30:10 +02:00
arvidn a6c85496b5 make parse_magnet_uri return the add_torrent_params instead of of taking an in-out parameter 2017-10-15 04:29:53 +02:00
arvidn 516df740a3 make session_handle::get_torrent_status return the vector instead of taking an out-parameter 2017-10-14 23:35:35 +02:00
arvidn bb65acb082 make feature_flags proper type-safe 2017-10-14 23:33:48 +02:00
arvidn f0bac4cac7 merged RC_1_1 into master 2017-10-14 15:22:22 +02:00
arvidn 8adcfdbf41 make disk_buffer_holder know the size of the bufer it holds, to fix buffer overrun in chained_buffer
fix
2017-10-13 21:07:31 +02:00
Alden Torres 58a76e26a8 fix warnings from asio/ssl includes 2017-10-13 21:06:42 +02:00
arvidn 8af89da689 fix GCC-4.9 build 2017-10-13 10:08:51 +02:00
Steven Siloti 2b72a7321a send one last state update when a paused torrent's rates reach zero (#2436) 2017-10-11 23:10:40 +02:00
arvidn 85b6d98454 merged RC_1_1 into master 2017-10-11 11:19:02 +02:00
arvidn f19cca1374 fix infinite loop when parsing certain invalid magnet links 2017-10-11 09:11:58 +02:00
arvidn 9111d5977e make the variables holding the source of external IPs type-safe 2017-10-10 22:38:36 +02:00