arvidn
4b6e11cc07
deprecate set_tracker_login
2015-12-13 15:14:19 -05:00
Arvid Norberg
9e51700739
Merge pull request #325 from arvidn/set_web_seeds
...
add set_web_seeds to torrent_info
2015-12-13 11:24:59 -05:00
arvidn
121b686a39
add set_web_seeds to torrent_info
2015-12-12 18:36:15 -05:00
arvidn
0f9d82ab22
fix bug in handling force-started checking torrents
2015-12-12 15:08:38 -05:00
Arvid Norberg
550b0bb047
Merge pull request #313 from arvidn/setup-swarm-cleanup
...
clean up setup-swarm simulation utility to be more flexible
2015-12-12 14:07:26 -05:00
arvidn
d505f93d7a
port sim tests to use the new setup_swarm API
2015-12-12 00:41:47 -05:00
arvidn
d80a129871
fix gcc warnings
2015-12-12 07:15:24 +02: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
409cfaccc1
Fix num_alert_types.
2015-12-03 22:04:32 -05:00
arvidn
8732863a9a
another fix to receiving malformed DHT error message
2015-12-03 01:08:27 -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
arvidn
7540a6e5cc
correctly check incoming DHT error messages
2015-11-30 18:02:00 -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
87b64f083a
fix python build
2015-11-29 11:12:58 -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
e9c0fc8eb5
fix bug that disabled rarest-first piece picking. introduced when removing speed-affinity in the piece picker
2015-11-29 08:26:00 -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
51df32a25b
fix logging issue
2015-11-27 14:04:46 -05:00
arvidn
847cd340ee
extend tracker sim test and fix some bugs in tracker error reporting
2015-11-24 23:38:49 -05:00
arvidn
06b648203f
clean up use of error categories
2015-11-24 00:50:51 -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
arvidn
91868f2086
add test for gzipped http responses
2015-11-24 00:39:01 -05:00
Thomas Yuan
603ef84c65
Fix observer_size.
2015-11-23 11:06:20 -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
Steven Siloti
8a984effa7
allow done() with a non-zero invoke count
2015-11-22 10:02:26 -08:00
Steven Siloti
6c5bed63d3
whitespace cleanup
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
4c790043a1
fix invariant check failure in torrent::pause
2015-11-20 01:38:21 -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
4aaa8ca4a9
silence msvc performance warnings. introduce more override and finals
2015-11-19 23:37:45 -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
Steven Siloti
86116caf4c
fix assert after a DHT get/put request
...
If an observer is abandoned due to there being more than 100 results in a
traversal then the traversal may complete while the observer is still
outstanding. When the observer times out or is aborted it calls
traversal_algorithm::failed() which asserts because m_invoke_count has been
cleared to zero by traversal_algorithm::done().
To fix this add a check when abandoning observers to see if they have an
outstanding query. If they do then flag them as done to prevent them from
calling back into the traversal and decrement the invoke count.
Fixes #271
2015-11-16 21:05:32 -08:00
Steven Siloti
ba1ccdec66
fix assert in dht::observer
...
This is was introduced by c2277b3ea5
"fix traversal_algorithm::done() being invoked more than once".
2015-11-14 18:30:42 -08:00
Arvid Norberg
64aba31e30
Merge pull request #263 from thomas-yuan/dead_loop_on_ios
...
Fix iOS dead loop issue.
2015-11-14 12:55:53 -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
c7a4eefd69
fixed typo
2015-11-14 02:22:35 -05:00
Thomas Yuan
b536cd4ab4
Fix iOS dead loop issue.
2015-11-14 00:53:39 -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
Steven Siloti
1bd706ac14
the simulator always supports IPv6
2015-11-12 20:52:30 -08:00
Arvid Norberg
ef1f399fd3
Merge pull request #259 from arvidn/deterministic-rand
...
use a consistent random number generator
2015-11-12 21:45:09 -05:00
Arvid Norberg
401f12b287
Merge pull request #260 from arvidn/ip-filter
...
fix IP filter bug when adding a torrent after setting the filter
2015-11-12 21:44:40 -05:00
arvidn
524cf00fcb
forward port of version change from RC_1_0
2015-11-12 21:35:50 -05:00
arvidn
d4d5f37222
fix typo
2015-11-12 01:42:44 -05:00
arvidn
2626159abe
use a consistent random number generator to make simulations deterministic
2015-11-12 00:21:56 -05:00
arvidn
8fa6863e15
fix IP filter bug when adding a torrent after setting the filter
2015-11-11 20:43:42 -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
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
9c10e99aef
forward port fix to not auto-detect disk cache size greater than the virtual address space for 32 bit builds
2015-11-07 22:00:20 -05:00
Arvid Norberg
61138630a3
Merge pull request #245 from arvidn/invalid-request
...
handle receiving an invalid request
2015-11-07 21:19:31 -05:00
arvidn
a48cb785d0
forward port piece_block patch from RC_1_0
2015-11-07 18:50:54 -05:00
arvidn
a138b2daa9
handle receiving an invalid request
2015-11-07 14:58:08 -05:00
arvidn
1fa184ba8a
fix msvc-10.0 build
2015-11-07 10:01:01 -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
ced0f74bf8
minor moving around of code
2015-11-06 00:38:42 -05:00
arvidn
ebb9fdaf54
add error_code to torrent_status instead of error string
2015-11-05 20:43:23 -05:00
arvidn
ee714306be
forward port IPv6 IP address resolution in URLs fix
2015-11-01 17:26:45 -05:00
arvidn
f5da27ba9e
support large info-sections in torrent_info
2015-10-31 10:53:39 -04:00
arvidn
3462c061a7
merged error handling fix from RC_1_0
2015-10-31 10:06:15 -04:00
Steven Siloti
bd0c237134
simulator: support IPv6 in enum_routes()
2015-10-29 20:43:51 -07: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
arvidn
a75dfe2eb6
silence warnings in boost headers in dht_storage
2015-10-25 09:30:56 -04:00
arvidn
234ac8adeb
update libsimulator submodule with IPv6 support
2015-10-24 15:57:22 -04:00
arvidn
e31433d952
flush and close the partfile when releasing files in default storage
2015-10-24 15:35:42 -04:00
Steven Siloti
4151c8e366
assert that the signature is valid when assigning a mutable value to an item
2015-10-21 20:29:29 -07:00
Arvid Norberg
ea86785d45
Merge pull request #202 from arvidn/stop-when-ready
...
Stop when ready
2015-10-04 16:18:59 -04:00
arvidn
8eded0a2a0
forward port set_allow_peers bugfix
2015-10-04 14:41:58 -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
e59d03f684
fix strict aliasing violation
2015-10-03 15:13:45 -04:00
arvidn
3d54c02450
fix build
2015-10-03 11:42:21 -04:00
arvidn
c798e388a9
forward port fix to proxy_peer_connections to master
2015-10-03 11:20:10 -04:00
Arvid Norberg
b785e789b6
Merge pull request #199 from arvidn/parse-magnet-fix
...
fix bug in parse_magnet_uri and improve unit test
2015-10-03 02:09:34 -04:00
arvidn
c1955ecb18
fix bug in parse_magnet_uri and improve unit test
2015-10-02 23:24:17 -04:00
Alden Torres
62b24d8b67
Add set_dht_storage to session API.
2015-10-02 09:00:07 -04:00
Arvid Norberg
c56e878ff4
Merge pull request #194 from arvidn/merge_http
...
forward port merge web seed patch
2015-10-01 01:46:18 -04:00
Arvid Norberg
d7cdcf9369
Merge pull request #183 from thomas-yuan/ta_init
...
start 'find' from near nodes instead of all of nodes in routing table.
2015-09-30 00:43:14 -04:00
arvidn
424e51b737
fix build
2015-09-30 00:41:41 -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
5da511f140
now that force-started torrents aren't affected by the auto-manager, they need to be explicitly kicked when entering checking state (it would be nice if all this could be done through set_state())
2015-09-29 20:49:38 -04:00