Commit Graph

3012 Commits

Author SHA1 Message Date
arvidn d505f93d7a port sim tests to use the new setup_swarm API 2015-12-12 00:41:47 -05:00
arvidn 54bf83739d fix assert in bdecode assert for strings with prefixes of 6 or more digits 2015-12-12 00:19:13 -05:00
Alden Torres e3fc859754 A few documentation typos. 2015-12-11 08:45:08 -05:00
Steven Siloti c6f1e0bd7b export verify_message and incoming_error
Also move these functions to a new msg.cpp. They are useful for plugins
which implement DHT extensions.
2015-12-05 18:20:08 -08:00
arvidn cc3b064cff fix graceful pause issue. peers regularly check whether they should disconnect or not 2015-12-04 23:27:43 -05:00
Alden Torres 1290bf5228 A few typos in documentation. 2015-12-04 18:15:11 -05:00
Alden Torres 409cfaccc1 Fix num_alert_types. 2015-12-03 22:04:32 -05:00
arvidn 98c9ac0448 fix msvc build 2015-12-03 19:28:57 -05:00
arvidn 69f4e94995 null_observer is used in a test now 2015-12-03 07:51:53 -05:00
arvidn 2acb3dcb24 clean up use of getrlimit() by wrapping it and move it to platform_util.cpp. Also take the opportunity to make it simulator friendly (consistent in simulation) 2015-12-02 00:45:34 -05:00
arvidn 12dde0f415 actually add a test to the unit test 2015-11-30 19:07:35 -05:00
Arvid Norberg d0da753fb8 Merge pull request #302 from arvidn/fix-save-resume
fix save_resume_data in client_test
2015-11-30 17:17:57 -05:00
arvidn 60df41cd85 fix save_resume_data in client_test and make torrent a bit more instrumentable. This could be greatly simplified if resume data would not have file_sizes and timestamps 2015-11-29 20:31:57 -05:00
arvidn 332799bff2 make alert types declared final and disable the log alert declarations when logging is disabled 2015-11-29 10:16:02 -05:00
arvidn fd3b53604c add new piece picker logging alert category 2015-11-29 08:25:55 -05:00
arvidn 2c3d7ee0ef fix a bug where the torrent's invariant was not always maintained as well as a shutdown issue (now covered by test as well) 2015-11-28 14:14:49 -05:00
Arvid Norberg 359fc5648b Merge pull request #296 from arvidn/udp-read-handler
more efficient handler allocation for udp and second_tick
2015-11-28 01:06:10 -05:00
arvidn a8e31fd8ca add first coverage of test_transfer as a proper sim 2015-11-28 00:59:39 -05:00
arvidn 98c3b75b55 use more efficient (in-place) handler allocation for udp async_read and session second_tick 2015-11-28 00:57:44 -05:00
arvidn e3dad98fbe fix an old use of posix_category. make http_connection translate IPs into proper endpoints when connecting over socks (instead of passing the IP on as a hostname string). add test coverage 2015-11-24 00:39:02 -05:00
arvidn 92236a9923 clean up error_code use, and use error_condition to test for errors in test_http_connection 2015-11-24 00:39:01 -05:00
arvidn 174e0aeb46 fix semantics of socks5_stream and http_connection to make them not close themselves. Add socks5 and socks4 proxy coverage in test_http_connection 2015-11-24 00:39:01 -05:00
Steven Siloti 9c7edf803e add override and a TODO 2015-11-22 18:58:32 -08:00
Steven Siloti 9f7aa7f3a6 fix segfault in put_data
If less than three nodes are found to put an item to then traversal_algorithm::start
will add router nodes. This leads to a crash in put_data::invoke when it tries to
read a token from uninitialized memory in a null_observer.
2015-11-22 16:05:24 -08:00
Steven Siloti 1f13343a70 const correctness 2015-11-22 10:02:26 -08:00
Arvid Norberg ddddce6e2a Merge pull request #280 from arvidn/stop-start-test
stop-start test
2015-11-21 02:31:11 -05:00
Arvid Norberg 42b129b9d5 Merge pull request #178 from thomas-yuan/put
Make dht_put_alert more accurate.
2015-11-21 02:30:45 -05:00
arvidn c0d6b20634 extend swarm simulation test to include stopping and starting and graceful pause 2015-11-20 22:27:12 -05:00
Arvid Norberg 2eabf99307 Merge pull request #276 from arvidn/msvc-warnings
attempt to fix some msvc warnings
2015-11-20 08:04:38 -05:00
arvidn f03cefceb6 fix documentation bugs 2015-11-20 01:00:39 -05:00
Thomas Yuan ab70ad3e05 fix comments and unit test 2015-11-20 00:06:08 -05:00
Thomas Yuan 194ad410dc Make dht_put_alert more accurate. 2015-11-20 00:06:08 -05:00
arvidn c9c5496f1c lower alignment requirement of socket_type to silence msvc warning (it was probably not warranted in the first place anyway) 2015-11-19 22:50:40 -05:00
arvidn fba0762353 fix some msvc warnings 2015-11-19 19:01:54 -05:00
arvidn 964031c070 factor out readwritev to a free function, to allow unit testing of it 2015-11-19 17:58:55 -05:00
arvidn cec6748e0c remove the concept of slots, and just talk about pieces (since we don't do compact allocation anymore). Remove the section about compact allocation 2015-11-19 01:38:04 -05:00
Arvid Norberg bdfed667e3 Merge pull request #267 from arvidn/storage-fix
fix support for incomplete reads/writes from disk
2015-11-14 12:54:57 -05:00
arvidn fb2f2731cf fix support for incomplete reads/writes from disk 2015-11-14 00:21:03 -05:00
Alden Torres 611d0c1c6e Fixed to make it compatible with mingw-w64 and generic linux 2015-11-13 07:55:28 -05:00
arvidn 2626159abe use a consistent random number generator to make simulations deterministic 2015-11-12 00:21:56 -05:00
Arvid Norberg bae2b3394f Merge pull request #258 from arvidn/version
forward-port version function from RC_1_0
2015-11-11 19:13:44 -05:00
arvidn fbf152abc0 attribute external IP voting to the actual tracker IP we connected to, and preserve endpoint list in http_connection to make the re-announce to IPv6 logic robust 2015-11-11 01:30:28 -05:00
arvidn d0dcf82612 fix bug in set_version and update version hash 2015-11-11 01:25:30 -05:00
arvidn 4c0b00c390 forward-port version function from RC_1_0 2015-11-11 00:57:51 -05:00
Steven Siloti c2277b3ea5 fix traversal_algorithm::done() being invoked more than once
A traversal can be done while there are still outstanding queries (i.e.
m_invoke_count is non-zero) if K good responses have already been received and
none of the outstanding queries are closer than the nodes which have responded.

When this happens and the outstanding queries eventually complete or timeout
they call traversal_algorithm::failed() or traversal_algorithm::finished() as
usual which will cause traversal_algorithm::done() to be called yet again.

The fix is to always set the done flag on all queried observers in
traversal_algorithm::done() so that the observers will refrain from calling
back into the traversal.

This also makes traversal_algorithm::abort() redundant since this was the only
thing it did before it called into done().
2015-11-09 20:47:33 -08:00
arvidn 4814855933 update cache_size docs and raise the cap for 32 bit builds 2015-11-08 10:49:38 -05:00
arvidn 2592acfd8c fix c++98 build 2015-11-07 21:14:52 -05:00
arvidn a48cb785d0 forward port piece_block patch from RC_1_0 2015-11-07 18:50:54 -05:00
arvidn 00090b8284 fix typo in test_checking, introduced by recent error_code in torrent_status patch 2015-11-07 01:01:07 -05:00
arvidn ebb9fdaf54 add error_code to torrent_status instead of error string 2015-11-05 20:43:23 -05:00
arvidn f5da27ba9e support large info-sections in torrent_info 2015-10-31 10:53:39 -04:00
arvidn 729a8e9152 update libsimulator. add simulation/test for announcing twice to trackers over IPv4 and IPv6. fix bugs preventing libtorrent from doing that correctly 2015-10-27 00:21:07 -04:00
arvidn 3cc464805f update libsimulator submodule 2015-10-25 10:55:20 -04:00
Calum Lind 8f244868a5 Remove leftover TORRENT_COMPACT_PICKER definition 2015-10-20 12:12:44 +01:00
arvidn 76821f138f fix gcc attribute order issue 2015-10-18 00:46:01 -04:00
arvidn 08e2bf7835 mark up some more functions with override and silence a few more warnings in boost headers 2015-10-17 10:02:37 -04:00
arvidn 74ee06bff7 add more override annotation 2015-10-17 02:20:38 -04:00
arvidn 81ee9d5d4e make appveyor build the python binding installer for windows 2015-10-12 21:09:19 -04:00
Alden Torres cf4c8d0058 Minor refactor in direct_traversal and some typos in bdecode header. 2015-10-08 09:15:16 -04:00
arvidn 41b8429cd1 clean up documentation makefile and documentation generation script 2015-10-07 00:48:43 -04:00
arvidn 6a7b9d1c4c typo 2015-10-07 00:46:28 -04:00
arvidn 16661fb67c fix documentation bug 2015-10-07 00:41:31 -04:00
arvidn 51c6079c42 add stop-when-ready feature, to support checking torrents without starting the download afterwards 2015-10-04 13:08:23 -04:00
arvidn c798e388a9 forward port fix to proxy_peer_connections to master 2015-10-03 11:20:10 -04:00
Alden Torres 62b24d8b67 Add set_dht_storage to session API. 2015-10-02 09:00:07 -04:00
arvidn a00e5aa6c7 forward port patch to have resume data web seeds override .torrent file web seeds, and a flag to merge them 2015-09-30 00:41:41 -04:00
arvidn dab0f8b8d0 simplify the queuing logic for checking torrents. make all non-auto-managed torrents always be exempt from any queuing mechanism (including checking). Extend documentation on how it works 2015-09-29 20:49:37 -04:00
arvidn 8b30e78d69 forward port fix for bug where dont_count_slow_torrents could not be disabled, into master 2015-09-25 14:22:38 -07:00
Alden Torres 197a443465 Fix of dht_storage_counters::peers counter. 2015-09-24 10:50:04 -04:00
Thomas Yuan f9fa8ffdec Use ping instead of get_peers if current bucket is full. 2015-09-22 10:35:10 -04:00
Arvid Norberg 50ccce6eed Merge pull request #174 from arvidn/fallocate-hack
remove fallocate hack (in master)
2015-09-22 07:18:07 -07:00
arvidn 5bdb583162 remove fallocate hack (in master) 2015-09-21 20:22:19 -07:00
Arvid Norberg 3e37785280 Merge pull request #152 from thomas-yuan/mutable-expiration
make immutable/mutable items lifetime configurable.
2015-09-21 20:20:53 -07:00
arvidn dc77da5630 fix build 2015-09-21 20:19:05 -07:00
Thomas Yuan 7fec9e488d make immutable/mutable items lifetime configurable. 2015-09-21 20:32:37 -04:00
Arvid Norberg 01193fcf7c Merge pull request #163 from aldenml/dht-storage-counters
Create dht_storage_counters to avoid internal counter in future public API
2015-09-21 13:51:39 -07:00
Alden Torres 25ed70b977 Create dht_storage_counters to avoid internal counter in future public API. 2015-09-21 07:46:23 -04:00
arvidn fb2f659a31 fix bug in time keeping of active_time, seeding_time, finished_time etc. 2015-09-21 00:38:56 -07:00
arvidn 2715ae475c expose whether torrents are announcing to trackers, lsd and dht. these can be disabled by the queuing logic 2015-09-19 01:54:47 -04:00
arvidn b628692223 separate out announce_entry and torrent_status into their own headers 2015-09-18 08:08:08 -04:00
Alden Torres e2d682275a Implementing and using new dht storage interface 2015-09-16 08:30:27 -04:00
Thomas Yuan bee620b4f1 Fix routing_table bucket_size(int bucket) out_of_range logic error. 2015-09-10 17:19:00 -04:00
Arvid Norberg abe994c191 Merge pull request #128 from thomas-yuan/patch2
Add read-only support in dht_settings and outgoing query messages.
2015-09-08 19:47:18 -04:00
Thomas Yuan d6bb387ab9 Use dht_settings directly instead of add a read_only member variable.
Since rpc_manager has a reference of dht_settings, needn't pass it
as a parameter for incoming().
2015-09-08 10:35:30 -04:00
arvidn ee3cb6cf86 move some internal headers to aux_ to fix documentation 2015-09-07 17:00:27 -04:00
Thomas Yuan 3d4ed9f37f Add read-only support in dht_settings and outgoing query messages. 2015-09-07 14:24:46 -04:00
arvidn 113e84e7f6 fix appveyor build 2015-09-07 02:34:14 -04:00
arvidn 17c5759829 disable warning for unused command line argument and fix warnings. remove redundant travis build config. use new preprocessor on clang to avoid warnings 2015-09-06 22:55:41 -04:00
arvidn b45c585a78 use gcc on linux and clang on osx 2015-09-06 22:55:41 -04:00
arvidn 536a5f897a update queuing documentation and regenerate html 2015-09-06 18:14:06 -04:00
arvidn cb65694578 fix const correctness in xml_parse(). update unit tests rss and upnp to use new signature for parser callback 2015-09-06 00:38:33 -04:00
arvidn a344c659e5 Revert "use handler allocator for UDP socket read handler"
This reverts commit 3ccb4f7dca.
2015-09-03 07:29:24 -04:00
arvidn 918aca9083 fix typo 2015-09-03 00:16:52 -04:00
randy-waterhouse 693586f23e Fix makefile.am allocating_handler.hpp call. 2015-09-03 08:48:59 +12:00
arvidn 3ccb4f7dca use handler allocator for UDP socket read handler 2015-09-02 01:15:02 -04:00
Arvid Norberg 915e56022b Merge pull request #127 from thomas-yuan/master
Fix dht_immutable/mutable_item_alert category.
2015-09-01 20:54:52 -04:00
Thomas Yuan 90e13e05f5 Fix dht_immutable/mutable_item_alert category. 2015-09-01 11:31:46 -04:00
Arvid Norberg 7285520521 Merge pull request #117 from thomas-yuan/master
Fix bug caused by RP #96.
2015-08-31 23:49:08 -04:00
Thomas Yuan ef16ae4e27 Handle response with unexpected format. 2015-08-31 22:37:46 -04:00
arvidn f719b95f64 fix build issue 2015-08-31 00:54:16 -04:00