Commit Graph

3791 Commits

Author SHA1 Message Date
Alden Torres 4a80e2667c fixing sign-conversion warnings, part 15, torrent class (#1686)
fixing sign-conversion warnings, part 15, torrent class
2017-02-11 14:58:02 -05:00
Arvid Norberg ff22c68df8 packet pool fixups (#1682)
packet pool fixups
2017-02-10 20:54:26 -05:00
Alden Torres 4d5ddc90f5 fixing sign-conversion warnings, part 14, minor refactor 2017-02-10 15:27:49 -05:00
Andrei Kurushin 76f91c3fc9 packet allocation pool (#1600)
packet allocation pool:
- no more direct malloc/free with cast
- reuse allocated memory for 3 common allocation case (with limit)
- access to packet_pool through utp_socket_manager instance
2017-02-10 08:25:03 -05:00
Andrei Kurushin c33081b075 - add windows guid listen_interfaces settings example (#1677)
add windows guid listen_interfaces settings example. rearrange comments for corresponding methods
2017-02-08 19:13:25 -05:00
Alden Torres 1f72843fe3 fixing sign-conversion warnings, part 13, minor refactor (#1675)
fixing sign-conversion warnings, part 13, minor refactor
2017-02-07 23:36:13 -05:00
ximply c4d96c7aa9 add web_seed_name_lookup_retry to session_settings (#1674)
add web_seed_name_lookup_retry to session_settings to control web seed
name lookup retry in seconds, default is 1800 seconds
2017-02-07 01:34:52 -05:00
Alden Torres c8569b5e34 fixing sign-conversion warnings, part 12, minor refactor, eol cleanup (#1670)
fixing sign-conversion warnings, part 12, minor refactor, eol cleanup. created aux::clamp and default_piece_priority refactor
2017-02-07 00:22:30 -05:00
Alden Torres b84766e346 minor cleanup refactor 2017-02-06 18:26:59 -05:00
Arvid Norberg 9e4045ed42 use 32 bit time points in torrent (#1662)
use 32 bit time points in torrent and add some slack to time point comparisons in python test
2017-02-05 19:18:06 -05:00
Alden Torres bfe6aba728 more robust implementation of aux::array::end_index 2017-02-05 19:17:23 -05:00
arvidn 381defab05 merged RC_1_1 into master 2017-02-05 12:51:48 -05:00
arvidn 7ff4f56ae2 add function to get default settings 2017-02-05 11:31:43 -05:00
Alden Torres de6f2a9d88 fixing sign-conversion warnings, part 11, created aux::array and refactor (#1649)
fixing sign-conversion warnings, part 11, created aux::array and refactor
2017-02-04 22:05:53 -05:00
Arvid Norberg c00a25a645 back-port aldenml's fix to not save replacement nodes twice to 1.1 (#1661)
back-port aldenml's fix to not save replacement nodes twice to 1.1
2017-02-04 19:58:32 -05:00
Falcosc a9d6d54111 fix multible torrent status timer bugs related to move time (#1492)
fix last_upload and last_download overflow after 9 hours in past. change last_upload, last_download, finished_time,  resume, upload_mode_time to time_point and duration
2017-02-04 13:34:14 -05:00
Alden Torres 3ef4109bf3 avoid double saving of replacements nodes, removed replacement_cache, test (#1656)
avoid double saving of replacements nodes, deprecated replacement_cache, test
2017-02-04 11:25:11 -05:00
arvidn 34ecb60c09 use enum class for close reason 2017-02-04 11:24:35 -05:00
Alden Torres 4c487ec47c using std:: for integral types 2017-02-03 22:15:47 -05:00
arvidn c8e488b094 merged RC_1_1 into master 2017-02-02 22:58:33 -05:00
Arvid Norberg 4733670aa1 fix issue where num_seeds could be greater than num_peers in torrent_status (#1645)
fix issue where num_seeds could be greater than num_peers in torrent_status
2017-02-01 01:39:09 -05:00
Falcosc e40bdc566c 1.1.2 set queue position by number (#1617)
set queue position by number
2017-01-30 21:31:31 -05:00
Arvid Norberg 29db3de6c0 wrap most instances of throw, and terminate on builds where exceptions are disabled (#1639)
wrap most instances of throw, and terminate on builds where exceptions are disabled
2017-01-29 15:37:42 -05:00
arvidn 3339b2abe1 back port file progress invariant checking to 1.1 2017-01-29 15:34:06 -05:00
arvidn 36858eae85 cleanup packet_buffer class 2017-01-29 10:35:23 -05:00
Alden Torres 2437b3c134 created aux::typed_span and related refactor 2017-01-28 23:28:38 -05:00
arvidn 1bef80c3fa report the true state of super_seeding of a torrent. If the torrent leaves finished or seeding state, it will clear it already 2017-01-28 21:27:25 -05:00
arvidn 95c8c1de0f fix build 2017-01-28 21:26:46 -05:00
Alden Torres deecdb6cfa added support for infohashes sample in dht storage (#1586)
added support for infohashes sample in dht storage
2017-01-28 20:24:53 -05:00
arvidn 17ee28d176 Merge branch 'master' of https://github.com/arvidn/libtorrent 2017-01-28 14:36:28 -05:00
arvidn 6b91adab6a merged RC_1_1 into master 2017-01-28 14:36:23 -05:00
Alden Torres 3803661863 moved alloca.hpp to private aux_ and size refactor (#1634)
moved alloca.hpp to private aux_ and size refactor
2017-01-27 12:43:34 -05:00
Alden Torres ddf1b62e4b fixing sign-conversion warnings, part 9 2017-01-27 01:23:18 -05:00
Alden Torres 533699bbb5 making strong_typedef::UnderlyingType constexpr and warnigs cleanup 2017-01-26 16:32:30 -05:00
Alden Torres 2bc7a60f33 fixing sign-conversion warnings, part 8, created aux::unique_ptr, refactor (#1616)
fixing sign-conversion warnings, part 8, created aux::unique_ptr, refactor
2017-01-26 08:31:20 -05:00
Alden Torres 070e85090b more std:: prefix, consts, auto refactor, formatting 2017-01-26 08:30:20 -05:00
Alden Torres 22b745d548 added TORRENT_NO_DEPRECATE around file_progress_float 2017-01-25 23:44:30 -05:00
Arvid Norberg ba9fae8e1f fix issue with unloading torrents (#1624)
fix issue with unloading torrents
2017-01-25 23:42:59 -05:00
Alden Torres 4ddd4b72c6 fixing sign-conversion warnings, part 7 (#1604)
fixing sign-conversion warnings, part 7
2017-01-24 01:35:17 -05:00
arvidn 605227d9da add test for get_cache_info 2017-01-24 01:31:16 -05:00
Alden Torres 4896a5ed3c added handler_storage default constructor when not TORRENT_USE_ASSERTS 2017-01-23 18:27:24 -05:00
Andrei Kurushin 7c9679bf6a fix missed static array specifier 2017-01-23 08:21:34 -05:00
arvidn 4c4a204bee fix inclusion of auxv.h header and definition of TORRENT_ANDROID 2017-01-22 14:11:44 -05:00
arvidn c15a575e34 remove dependency on aligned_storage and aligned_union to support older versions of GCC 2017-01-22 14:11:44 -05:00
Alden Torres 8b98bf2c9d more use of peer_class_t in public API 2017-01-22 14:06:27 -05:00
Andrei Kurushin 06c68052b4 fix missed static array specifier 2017-01-22 13:39:10 -05:00
arvidn c239c2bdc4 factor out storage_piece_set into its own file 2017-01-22 09:29:52 -05:00
arvidn d03540e3b3 move disk_job_fence to its own file 2017-01-22 01:20:27 -05:00
arvidn 61c057947c add typedefs for shared_ptr and make_shared, to make transition to 1.2 easier 2017-01-21 23:10:33 -05:00
Arvid Norberg 6a701437b6 use strong_typedef for peer_class_t type (#1595)
use strong_typedef for peer_class_t type
2017-01-21 22:40:19 -05:00
arvidn 3763a47846 fix truncation of peer_class field in torrent 2017-01-21 18:49:48 -05:00
arvidn 173951ec7f merged RC_1_1 into master 2017-01-21 02:28:29 -05:00
arvidn 6d17f0fb66 storage optimization to peer classes 2017-01-21 01:23:07 -05:00
Alden Torres c4c80b59d5 created numeric_cast<> and using it in stack_allocator 2017-01-20 20:52:16 -05:00
arvidn 202386dd9d factor out verify_resume_data to storage_utils 2017-01-20 01:36:03 -05:00
Andrei Kurushin 393e705d5c refactor entry::dictionary_type (#1568)
consolidate conditional std::map string code
enable C++14 string_view std::map for VS2015
2017-01-19 18:08:39 -05:00
arvidn e98dd14760 factor out delete_files function into storage_utils 2017-01-18 00:56:01 -05:00
Alden Torres c33af5a552 added dht_invalid_find_node counter metric 2017-01-18 00:55:32 -05:00
Alden Torres ef9d1ecd7f fixing sign-conversion warnings, part 6 2017-01-17 20:51:26 -05:00
Arvid Norberg ec37436d49 factor out move_storage function to storage_utils.cpp (#1571) 2017-01-17 08:02:44 -05:00
Alden Torres a5825c0d2e fixing sign-conversion warnings, part 5, minor refactor (#1559)
fixing sign-conversion warnings, part 5, minor refactor
2017-01-16 21:51:49 -05:00
arvidn 5736237a63 fix error handling in random.cpp and fix accidental openssl dependency 2017-01-16 21:33:57 -05:00
Falcosc a07ffe42f8 fix torrent peer class index overflow (#1557)
fix peer class index width
2017-01-16 18:20:43 -05:00
arvidn 3b9c65daf1 remove unused function, has_interface() 2017-01-16 15:14:47 -05:00
arvidn 0c189e08b5 use /dev/random as random number source on macOS 2017-01-15 12:18:08 -05:00
Arvid Norberg 04589f3bef don't load user_agent and peer_fingerprint from session_state (#1538)
don't load user_agent and peer_fingerprint from session_state
2017-01-15 01:21:52 -05:00
arvidn 934c58a816 merged RC_1_1 into master 2017-01-15 00:45:17 -05:00
Alden Torres df6cb6a48d fixing sign-conversion warnings, part 4, minor refactor (#1549)
fixing sign-conversion warnings, part 4, minor refactor
2017-01-14 18:53:25 -05:00
Falcosc 564fbea065 Docu for deprecated (#1551)
documentation for deprecated members
2017-01-14 12:58:44 -05:00
Falco 51aa8e6928 documentation for deprecated members 2017-01-14 09:18:32 -05:00
Alden Torres c3d9614dfb minor code refactor and cleanup 2017-01-14 06:59:44 -05:00
Alden Torres 1874a917b0 added std:: prefix, end of file cleanup, formatting, consts 2017-01-14 05:59:26 -05:00
arvidn 07d45329ea fix stats_metric enum to end up in documentation 2017-01-13 17:37:37 -05:00
Falcosc 9199756a27 fix bitfield m_buf null pointer (#1526)
fix operations on empty bitfield
2017-01-13 17:08:54 -05:00
Alden Torres a31ba7972d fixing sign-conversion warnings, part 3 (#1537)
fixing sign-conversion warnings, part 3. making aux::vector index type default to int
2017-01-13 01:55:29 -05:00
Alden Torres 7ac2805c2c added custom resize methods to aux::vector (#1514)
added custom resize methods to aux::vector, code refactor
2017-01-12 18:40:59 -05:00
Arvid Norberg 3d06371f31 factor out some common storage utilities out of storage.cpp (#1515)
factor out some common storage utilities out of storage.cpp
2017-01-11 00:42:10 -05:00
arvidn d6a7c7d991 fix error in accounting of IP overhead 2017-01-11 00:02:18 -05:00
Alden Torres 3b4867046f fixing sign-conversion warnings, part 2 2017-01-10 20:19:03 -05:00
arvidn d1ea80c2c3 remove disk-access-log build configuration 2017-01-09 08:37:02 -05:00
Alden Torres 0f7a55cb8b fixing sign-conversion warnings, part 1 (#1503)
fixing sign-conversion warnings, part 1
2017-01-09 01:43:57 -05:00
arvidn 1d1ab4f4b5 removed file-leak code, temporarily used to trouble-shoot files appearing to be left open 2017-01-09 01:43:15 -05:00
Arvid Norberg 1cf3689578 simplify disk thread a little bit (#1504)
simplify disk thread a little bit
2017-01-08 19:22:59 -05:00
Andrei Kurushin 224db08997 fix frequent dealloc/alloc for utp socket lists (#1496)
fix frequent dealloc/alloc for utp socket lists
2017-01-08 19:18:26 -05:00
Andrei Kurushin 78bacfe7c1 fix various build options 2017-01-07 10:49:42 -05:00
Andrei Kurushin ff8345101e consolidate windows crypto provider implementation into single header (#1495)
consolidate windows crypto provider into single header
2017-01-07 01:53:39 -05:00
Arvid Norberg 57f52adc88 various cleanup (#1497)
* various cleanup

* fix

* cleanup
2017-01-06 01:39:01 -05:00
arvidn 41dbb47123 compact block_cache_reference by using storage_index_t instead of pointer. make sure storage object is kept alive by block_cache_references 2017-01-02 13:45:16 -05:00
arvidn 4ebc344e48 make disk_io_thread responsible for the storage object. torrents refer to it by index 2017-01-01 13:54:39 -05:00
arvidn 9007c8333f merge RC_1_1 into master 2017-01-01 11:08:57 -05:00
arvidn 1600d4dca5 clean up file pool a bit 2017-01-01 09:56:50 -05:00
arvidn 005d1a47b0 deprecate dont_flush_write_cache setting 2016-12-31 17:44:57 -05:00
arvidn 23a7e8d40a hide the block_cache_reference from disk_buffer_holder 2016-12-31 10:31:54 -05:00
arvidn 59b322bc79 merged RC_1_1 into master 2016-12-29 08:54:28 -08:00
arvidn 5a97af54db optimize chained buffer a bit and factor out nop into non_owning_handle 2016-12-29 07:05:18 -08:00
Pavel Pimenov 98cdc3192d Missing member init (#1467)
initialize members of piece_block and use default member initialization.
2016-12-29 06:55:58 -08:00
Arvid Norberg af126fe507 make buffer_allocator_interface an implementation detail of the disk_io_thread (#1463)
make buffer_allocator_interface an implementation detail of the disk_io_thread by using disk_buffer_holder in the disk interface. make chained_buffer use holders instead of free deleter functions and userdata to support putting disk_buffer_holder objects in there. Also make the session buffers be held by holders
2016-12-28 17:47:18 -08:00
Pavel Pimenov 516e86d0ea Refactoring routing_table (#1468)
routing_table refactor. ip_set::count -> ip_set::exists. Fix copy-paste routing_table::remove_node
2016-12-28 14:40:56 -08:00
Andrei Kurushin e10edb5e0b move LoadLibrary logic to new win_util module (#1464)
move LoadLibrary logic to new win_util module. use get_library_procedure as common windows dyn proc load routine
2016-12-28 10:12:20 -08:00
Andrei Kurushin 08aab3a879 make internal sha1 & sha512 implementation declarations match libcrypto api 2016-12-27 22:30:57 -08:00
Arvid Norberg f1e34dfbd5 remove long-standing deprecated filter_pieces functions (#1457)
remove long-standing deprecated filter_pieces functions
2016-12-27 12:42:23 -08:00
Arvid Norberg b74bdfa7db make dht logging deterministic (#1460)
make dht logging deterministic (ues an id instead of this-pointer to identify a traversal algorithm)

try with more DHT nodes
2016-12-27 07:12:57 -08:00
arvidn 45f3f80d86 fix windows build 2016-12-27 06:33:40 -08:00
Andrei Kurushin 1ec5c69dcd minor code corrections (#1430)
use compact span cast. extend split_path api with only_first_part flag. use single loadlibrary and getprocaddress for IP helper
2016-12-26 22:45:48 -08:00
arvidn 2f75dcccfe on backwards compatible set_settings(), stack allocate settings_pack 2016-12-26 22:44:42 -08:00
arvidn 192ef4962b simplify the buffer_allocator_interface 2016-12-26 08:36:50 -08:00
arvidn cda715c152 introduce type for slot index in part_file 2016-12-26 08:33:19 -08:00
Arvid Norberg 42a27b3ebc introduce a prio_index_t type (#1453)
* introduce a prio_index_t type for indexing into the priority sorted piece list, m_pieces, in piece_picker

* some piece picker simplification

* fix msvc warning for prio_index_t
2016-12-26 08:25:50 -08:00
arvidn 5ed0086b51 removed mmap_cache feature 2016-12-25 21:12:49 -08:00
Pavel Pimenov c34a2541cc Log refactoring (#1446)
factor out common logging code in some dht traversal algorithms
2016-12-24 06:46:21 -08:00
arvidn 96c2bc7e46 modernize vector_utils.hpp 2016-12-23 17:37:44 -08:00
arvidn 3f612d7e99 cleaning up of left-overs from torrent eviction functionality 2016-12-23 06:06:59 -05:00
Alden Torres 21cf625132 swig related fix in units.hpp, swig parser needs named typename 2016-12-22 21:21:36 -05:00
Pavel Pimenov 6afb1f3e83 aux::to_hex(sha1) -> sha1.to_hex() (#1418)
generate hex strings into std::string instead of stack-allocated char arrays
2016-12-22 10:44:36 -05:00
Arvid Norberg 3f1084d63d strengthened type safety in handling of piece and file indices (#1409)
strengthened type safety in handling of piece and file indices
2016-12-22 10:42:33 -05:00
arvidn 93f400265b revert change to use std::time_t (mingw64 has abi issues) 2016-12-22 01:13:17 -05:00
arvidn a2c4e7490e merged RC_1_1 into master 2016-12-20 01:16:13 -05:00
Falcosc 8adcbdd32b add setting urlseed_max_request_bytes to handle large web seed requests #1405 (#1423)
add setting urlseed_max_request_bytes to handle large web seed requests. change default for urlseed max request to 16MIB
2016-12-18 15:58:14 -05:00
Alden Torres eaf99aa42b fixed more warnings of shorten-64-to-32 and sign-compare in android (#1425)
fixed more warnings of -Wshorten-64-to-32 in android. changed file_status to use std::time and disable warnings of NLMSG_OK in clang
2016-12-18 10:59:41 -05:00
Andrei Kurushin d62b980278 backport fix upnp xml_parse 2016-12-18 09:01:33 -05:00
Andrei Kurushin 10e3847b40 fix upnp (#1421)
* fix upnp xml_parser, and listen sockets remap
2016-12-17 17:50:03 -05:00
Alden Torres 1b808b6516 refactor in aux::write_ to avoid explicit castings (#1426)
refactor in aux::write_ to avoid explicit casts
2016-12-17 15:03:43 -05:00
Steven Siloti 916fc92c49 create separate function for reading a node from a list 2016-12-17 02:22:13 -05:00
Alden Torres f715ebfd97 header fix and refactor in udp_tracker_connection and typos in lazy_entry 2016-12-17 02:20:29 -05:00
Alden Torres 139528aae4 code refactor in torrent.cpp for more auto loop and formatting 2016-12-17 02:12:23 -05:00
Alden Torres 22b596945e enable /W4 warnings for msvc 2016-12-13 19:36:14 -05:00
Alden Torres 63df1a26b6 changelog note, typos and .gitignore 2016-12-13 08:11:09 -05:00
Alden Torres f382936d56 headers, end of file, code cleanup 2016-12-12 23:36:45 -05:00
Steven Siloti ca07ee83a3 mark all converstion to bool operators as explicit 2016-12-12 01:34:36 -05:00
Alden Torres d9f8d4b642 refactor to more use of auto c++11 keyword (#1404)
refactor to more use of auto c++11 keyword
2016-12-11 20:50:30 -05:00
Alden Torres 21fb0e8c20 making tracker_manager::remove_request type specific 2016-12-11 14:20:37 -05:00
Alden Torres 3a92908f39 formatting, added std:: and spaces 2016-12-10 23:11:43 -05:00
arvidn bbfe58d03c fix bind-to-device for UDP sockets 2016-12-10 18:18:54 -05:00
Alden Torres 6b70ac1f77 improved port reading in lsd, minor code refactor 2016-12-10 12:18:31 -05:00
Alden Torres 123a6389cd minor refactor in torrent_status and minor header cleanup in torrent_handle 2016-12-09 17:18:03 -05:00
Pavel Pimenov d8b413c771 Fix c4996 strcpy (#1395)
use std::memcpy() instead of std::strcpy()
2016-12-09 17:17:27 -05:00
Alden Torres 4142dfe5eb headers and code cleanup in udp_socket code 2016-12-06 22:54:29 -05:00
Alden Torres 37cbdc5b37 fixing shorten-64-to-32 warnings, part 1 2016-12-05 00:22:17 -05:00
Steven Siloti b9169609df support separate external ip for each interface (#1383)
support separate external ip for each interface
2016-12-04 15:58:51 -05:00
arvidn 29e09a457a fix deprecation of use_interface 2016-12-04 01:41:52 -05:00
Markus c0f00499b1 Clarify documentation (#1368)
clarify documentation of private torrents
2016-11-30 09:11:16 -05:00
arvidn 6267984e5e piece picker fix 2016-11-30 01:34:10 -05:00
arvidn 09b5cfd688 remove build option to use narrower types in piece_picker (optimize_memory_usage) 2016-11-29 08:11:51 -05:00
Pavel Pimenov e3c5a639ca Add bt_peer_connection::write_dht_port() (#1360)
add void bt_peer_connection::write_dht_port()
2016-11-29 08:11:13 -05:00
Alden Torres d5c4cd7280 fixed sign-compare warnings and some refactor (#1354)
fixed sign-compare warnings and some refactor. make sequence_number backed by std::int64_t
2016-11-27 08:46:53 -05:00
Arvid Norberg 54f052a97b allocation slot type (#1352)
use a specialized type for allocation slot indices
2016-11-26 03:09:01 -05:00
Arvid Norberg 15ab8f387b cleaning up of disk_interface and improving type safety (#1353)
cleaned up disk_interface and improved type safety. removed unused disk status code disk_check_aborted, and removed status code return value for async_hash
2016-11-26 01:51:47 -05:00
Arvid Norberg 5c8e6d6e97 use more compact internal representation for bool settings (#1355)
use more compact internal representation for bool settings
2016-11-26 01:34:57 -05:00
Alden Torres c30027e4a1 more integral type conversion warning fixes, now only needs shorten-64-to-32 (#1349)
more integral type conversion warning fixes, now only needs shorten-64-to-32
2016-11-25 11:17:25 -05:00
arvidn b3c3c2aae6 merged RC_1_1 into master 2016-11-24 07:40:32 -05:00