arvidn
c292696dcb
back-port fix adding empty file as torrent
2016-05-14 13:13:20 -04:00
Arvid Norberg
6dcbeae8bb
Async add torrent test ( #728 )
...
add test for async_add_torrent
2016-05-14 10:19:33 -04:00
Arvid Norberg
167cbe74b5
made alerts move-only and remove dispatch function and other deprecated alert functions requiring alert to be copyable ( #721 )
2016-05-13 08:19:44 -04:00
Andrei Kurushin
674641acce
fix file_storage::m_paths memory reuse ( #724 )
...
fix file_storage::m_paths memory reuse after rename_file with path delimiter
2016-05-12 16:45:23 -04:00
Arvid Norberg
a4beb287ee
attempt fo fix msvc warning and built tests with warnings-as-errors ( #710 )
...
fix msvc warnings and built tests with warnings-as-errors
2016-05-08 09:58:13 -04:00
arvidn
6cf5ac9dd1
merged RC_1_1 into master
2016-05-06 01:08:05 -04:00
Arvid Norberg
985436636e
added new preformatted type to bencode entry ( #698 )
...
added new preformatted type to bencode entry to support carrying a verbatim copy of an already bencoded subtree. This is to support saving torrents in resume data and create_torrent based on existing torrents, in order to preserve key order
2016-05-05 21:38:57 -04:00
Arvid Norberg
f9bc6dbc54
improvements to socks5 support (for 1.1.1 release) ( #567 )
...
capture listen IP and port from socks5 BIND response. add tests for socks5 and improve support for capturing the local endpoint (i.e. bind port) for BIND command socket connections. post listen_succeeded_alert when successfully bound to listen socket on SOCKS5 proxy. make sure to announce the socks5 listen port
2016-05-05 17:09:11 -04:00
Arvid Norberg
c6369194f0
simplify and optimize DHT routing table IP distance comparison ( #696 )
2016-05-03 23:22:25 -04:00
Arvid Norberg
077e9bb10c
improve node-id operations ( #693 )
...
improve node-id operations, to operate on 32 bits at a time instead of 8. move out some code into sha1_hash.cpp, from the header file
2016-05-03 08:29:27 -04:00
Arvid Norberg
c91a700c07
Msvc warnings ( #685 )
...
fix msvc warnings and build examples with warnings-as-errors
2016-05-02 12:36:21 -04:00
Alden Torres
b85b501d92
Using address::is_multicast instead util function ( #686 )
2016-05-01 18:15:25 -04:00
Arvid Norberg
0d5428a664
minor refactoring to move-storage patch ( #680 )
...
minor refactoring to move-storage patch
2016-05-01 12:23:02 -04:00
arvidn
78bc269832
use std::chrono and not boost::chrono
2016-05-01 08:50:30 -04:00
Arvid Norberg
770afadcda
use std::atomic instead of boost::atomic ( #678 )
...
use std::atomic instead of boost::atomic
2016-05-01 03:38:35 -04:00
Steven Siloti
ff0675e64e
use standard array container ( #676 )
2016-04-30 23:10:47 -04:00
Vladimir Golovnev
64cb8b236a
Move storage "file-by-file" ( #632 )
...
When moving storage for a torrent, only move files belonging to the torrent, one by one.
2016-04-30 22:18:38 -04:00
Arvid Norberg
20b41ad0b9
Threads ( #671 )
...
use std::thread, std::mutex, std::condition_variable instead of pulling them in from boost.asio internals.
2016-04-30 18:54:23 -04:00
Arvid Norberg
4e97bf556c
use override and final keywords (unconditionally) ( #668 )
...
use override and final keywords instead of macros.
2016-04-30 11:05:54 -04:00
Arvid Norberg
f856b6bbe3
dial up cppcheck ( #663 )
...
increase cppcheck coverage and make sure there are no warnings
2016-04-30 00:24:45 -04:00
arvidn
05626e0b0f
fix test rename_file
2016-04-29 23:57:26 -04:00
arvidn
36a5a11ee2
merge fix
2016-04-29 23:34:25 -04:00
Arvid Norberg
84a35f5265
clean up settings_pack ( #665 )
2016-04-29 12:01:33 -04:00
Arvid Norberg
95e348bef7
fix name clash with 'thread' on freebsd ( #664 )
2016-04-29 12:00:39 -04:00
Arvid Norberg
d93bf9096d
attempt to fix race condition in udp_tracker in test framework ( #660 )
2016-04-28 23:13:49 -04:00
Arvid Norberg
c3e1e405b2
remove variadic template emulation for c++98, and introduce emplace_back to heterogeneous_queue as well, to avoid all moves of alert objects ( #658 )
2016-04-28 10:30:29 -04:00
Alden Torres
d08bbbc0cc
Added asserts related to total_size in create_torrent ( #642 )
2016-04-26 00:37:47 -04:00
Arvid Norberg
3c785b96fc
Merge pull request #268 from ssiloti/dht-ipv6
...
Support DHT over IPv6
2016-04-25 19:19:48 -04:00
Andrei Kurushin
62eb956c54
fix x64 build with VS2015 UP2 compiler ( #640 )
...
fix VS2015 compiler warnings for: address-model=64, deprecated-functions=on, link=shared
2016-04-25 17:22:09 -04:00
Steven Siloti
2d9a6b76f1
use asio::protcol instead of an enum/bool
2016-04-24 15:18:47 -07:00
Steven Siloti
43be11177b
Add dual stack DHT node simulation tests
2016-04-24 14:26:57 -07:00
Steven Siloti
2abd9867ce
IPv6 DHT support
...
Fixes #110
2016-04-24 14:26:57 -07:00
Steven Siloti
356d2506bd
extend dht_observer to support IPv6 external addresses
2016-04-24 14:26:57 -07:00
arvidn
dec093dc1a
Merge branch 'RC_1_1'
2016-04-24 15:41:28 -04:00
Arvid Norberg
7251575d98
This patch does: ( #633 )
...
1. simplifies and regularizies creation of listen sockets based on the listen
interfaces setting.
2. simplifies and improves the behavior of UDP sockets, which are now explicitly
opened per listen interface
3. transitions udp tracker, DHT and uTP socket manager over to using the new
udp sockets
4. greatly simplified udp_socket to only wrap a single underlying socket (as
opposed to one IPv4 and IPv6 socket)
5. improved behavior of bind-to-device
6. introduce an array_view type to make udp packet passing code simpler
7. simplify and make setting of DF flag more robust
8. simplify and regularize port mapping of listen sockets
2016-04-24 15:26:28 -04:00
Alden Torres
6171c911a0
Added assert for total_size in create_torrent ( #636 )
2016-04-22 13:51:06 -04:00
arvidn
04a3c04075
merged RC_1_1 into master
2016-04-20 08:08:05 -04:00
Arvid Norberg
2bd8622f4b
fix missing EXPORT annotation of functions in the test utility library ( #631 )
2016-04-20 07:51:25 -04:00
Andrei Kurushin
c41ab094be
fix release build with VS2015 UP2 compiler warnings for: examples, test, tools ( #627 )
...
fix release build with VS2015 UP2 compiler warnings for: examples, test, tools
2016-04-20 00:45:32 -04:00
arvidn
d17ae19391
Merge branch 'RC_1_1'
2016-04-11 02:08:06 -04:00
arvidn
2921caf95e
fix msvc test build. make test framework robust to tmpfile() failing. add missing files and tests to makefile
2016-04-10 20:46:51 -04:00
arvidn
5ebb7d203b
Makefile fix
2016-04-10 15:10:29 -04:00
arvidn
08edf43b3f
fix to documentation generation to exclude private functions. fix makefile errors
2016-04-09 00:33:26 -04:00
arvidn
867b83ccda
merged RC_1_1 into master
2016-04-08 02:20:24 -04:00
arvidn
6bc5de5903
fail correctly when move_storage is called to move into its own directory
2016-04-02 10:03:31 -04:00
arvidn
f662d86458
fix merge issue in test_storage.cpp
2016-03-30 02:06:10 -04:00
arvidn
fd4a46342f
merge RC_1_1 into master
2016-03-30 00:33:29 -04:00
Arvid Norberg
a5af3b0dc5
Merge pull request #563 from arvidn/no-compact-1.1
...
remove remaining references to storage_mode_compact
2016-03-20 23:20:19 -04:00
arvidn
b16f43132b
Merge branch 'RC_1_1'
2016-03-20 20:39:49 -04:00
Arvid Norberg
ee2d7a039d
Merge pull request #562 from arvidn/coalesce-reads-1.1
...
make coalesce reads and coalesce writes actually work
2016-03-20 20:25:51 -04:00
arvidn
f5c112eefc
remove remaining references to storage_mode_compact (since it's been deprecated for quite a while now, and no longer implemented)
2016-03-20 18:25:24 -04:00
arvidn
2dd28c1708
just use malloc/free in test_storage (instead of page_aligned_allocator). file no longer requires alignment
2016-03-20 17:00:49 -04:00
arvidn
0095aa084f
make coalesce reads and coalesce writes actually work
2016-03-20 16:34:19 -04:00
arvidn
96e2693d13
merge RC_1_1 into master
2016-03-19 16:02:46 -04:00
arvidn
f7c9062019
deprecate more parts of explicit cache as well as fixing typos of TORRENT_NO_DEPRECATE preprocessor tests
2016-03-19 07:54:29 -04:00
Arvid Norberg
50f7c88cee
Merge pull request #554 from arvidn/tracker-next-test-1.1
...
convert tracker try-next test to be a simulation (and deterministic)
2016-03-18 19:49:18 -04:00
arvidn
d3df16cd12
convert tracker try-next test to be a simulation (and deterministic)
2016-03-18 14:38:45 -04:00
arvidn
3c98868f6c
deprecate explicit cache feature
2016-03-18 12:15:03 -04:00
arvidn
ff44af2854
fix test_torrent on windows
2016-03-17 08:18:29 -04:00
arvidn
f79a9c7adf
merged RC_1_1 into master
2016-03-16 19:59:53 -04:00
Arvid Norberg
82d177472e
Merge pull request #541 from arvidn/fix-test-transfer-1.1
...
improve message from listen_failed_alert
2016-03-14 21:43:34 -04:00
arvidn
921cbeebed
add option to delete just the partfile when removing a torrent
2016-03-14 08:26:39 -04:00
arvidn
fb85e5e60f
improve message from listen_failed_alert. Post listen_failed_alert for every failure, including the ones that are re-tried
2016-03-13 16:18:44 -04:00
arvidn
6d85c7c5f0
merge RC_1_1 into master
2016-03-08 01:10:48 -05:00
arvidn
f5d5ac4f3a
fix bug where disk cache was wiped out after completion file-checking. factor out sim test utilities and reuse them in the regression test
2016-03-06 21:44:38 -05:00
arvidn
442979c318
support filtering which parts of session state are loaded by load_state()
2016-03-06 16:35:49 -05:00
arvidn
26f88bb12d
add receive_buffer unit test and some more cleanup and asserts
2016-03-05 00:14:00 -05:00
arvidn
84eafac1e2
add more slack to test_recheck, as it has been failing on and off on travis
2016-03-02 21:38:20 -05:00
arvidn
8ffa76842c
fix test_upnp build
2016-02-28 01:18:27 -05:00
arvidn
587e888152
fix bug in torrent_info::rename_file
2016-02-27 10:20:23 -05:00
arvidn
2fd8047308
merged RC_1_1
2016-02-24 21:22:39 -05:00
arvidn
e5ccb63375
fix build with openssl and deprecated functions disabled
2016-02-24 02:07:27 -05:00
arvidn
dcd6af6473
more fixing of test_transfer proxy tests
2016-02-24 00:03:56 -05:00
arvidn
d748a59029
attempt to fix test_transfer
2016-02-23 19:13:14 -05:00
arvidn
d599bef0ee
add unit test for read_resume_data
2016-02-20 13:26:21 -05:00
arvidn
516db1fc97
fix python binding
2016-02-20 12:51:06 -05:00
arvidn
c9d7e54d7b
make tests pass
2016-02-20 12:50:52 -05:00
arvidn
b496eff206
reduce noise in output from test_resume
2016-02-20 02:00:07 -05:00
arvidn
8135ea326f
rename async_check_fastresume to async_check_files, and make it take an add_torrent_params object instead of bencoded resume data
2016-02-20 02:00:07 -05:00
arvidn
6d77000ab0
deprecate ssl_listen setting. instead ssl sockets are specified by an 's' suffix of the port in listen_interfaces.
2016-02-12 15:46:12 -05:00
arvidn
3842a0a197
Merge branch 'RC_1_1'
2016-02-12 15:43:13 -05:00
arvidn
126ce22cb9
Merge branch 'RC_1_1'
2016-02-10 02:10:02 -05:00
arvidn
ceb0ac6148
fix issue in socket binding and back-port ssl test reliability fix
2016-02-10 02:09:12 -05:00
arvidn
d91054b8f1
forward port fix to ip_voter from RC_1_0
2016-02-09 19:09:53 -05:00
arvidn
4f40f84a7e
Merge branch 'RC_1_1'
2016-02-08 15:28:34 -05:00
arvidn
dd48faa8d4
minor debug logging issue in test facility wait-for-alert and fix minor shutdown issue with udp_socket packet subscription
2016-02-08 02:05:00 -05:00
Steven Siloti
ad9d50c6b8
add make_torrent to Makefile.am
2016-02-06 19:46:19 -08:00
arvidn
660647b590
improve abstraction level of stats cache and fix test
2016-02-06 15:51:00 -05:00
arvidn
ae7058e119
remove the timestamps and file sizes from the resume data. This makes saving resume data alot cheaper, since it doesn't have to go via the disk thread. It also removes an old-standing API usage issue where there was easily a race condition introduced between saving resume data and pausing a torrent.
2016-02-06 15:50:55 -05:00
arvidn
3a4f957b63
Merge branch 'RC_1_1'
2016-02-02 02:02:24 -05:00
arvidn
88b7e3768f
add sim test for optimistic unchoke round-robin distribution
2016-02-01 20:28:30 -05:00
arvidn
9f1b27cf5f
Merge branch 'RC_1_1'
2016-01-30 01:47:19 -05:00
arvidn
efe32c6a0e
rewrite most of web_peer_connection::on_receive to make it a lot simpler and fix edge cases with pad-files
2016-01-28 01:58:33 -05:00
arvidn
3153521367
merged RC_1_1 into master
2016-01-21 23:59:30 -05:00
arvidn
0cb35d714c
fix test in test_storage
2016-01-20 19:38:18 -05:00
Arvid Norberg
a80c4f4777
Merge pull request #397 from arvidn/dht-rate-limit
...
move the DHT rate limiter into the dht_tracker class
2016-01-18 15:39:37 -05:00
arvidn
06b52f1421
some cleanup of the dht_socket_interface and fix tests and simulations to build with the dht disabled
2016-01-18 14:34:42 -05:00
arvidn
4cbbb0620e
only strip trailing dots and spaces from filenames on windows
2016-01-18 13:07:04 -05:00
arvidn
13f03ce38a
print the actual stats in session_stats_alert::message() and make parse_session_stats.py parse the alert output. add stats_metric objects for all performance counters
2016-01-12 23:34:37 -05:00
Steven Siloti
ab7ef98b01
ensure all immutable items are stored at least once
...
If num_peers is set to 1 then the item will never be stored. Bump the
minimum value to 2 so that announce_immutable_items stores all items
at least once.
2016-01-12 19:32:02 -08:00
arvidn
651b473908
add unit test for routing_table::update_node_id
2016-01-11 23:47:27 -05:00
Alden Torres
0f442f59f3
Avoid pass IPv6 address to current implementation of DHT while adding a node
2016-01-09 18:46:19 -05:00
Luca Bruno
15ef71303a
autotools: fix `make check` running
...
Signed-off-by: Luca Bruno <lucab@debian.org>
2016-01-04 14:28:05 +01:00
Luca Bruno
6feab20733
test: fix enum_if compilation
...
Signed-off-by: Luca Bruno <lucab@debian.org>
2016-01-04 14:27:39 +01:00
Luca Bruno
73c950b99b
test: fix test_lsd compilation
...
Signed-off-by: Luca Bruno <lucab@debian.org>
2016-01-04 14:25:49 +01:00
arvidn
66c14e968b
disable disk-full test, because it's flaky
2016-01-03 13:30:32 -05:00
arvidn
07ddb010c5
split buckets when exceeding the next bucket's size, to make sure we split before risking discarding nodes because the next bucket is smaller
2016-01-02 00:45:44 -05:00
arvidn
01e6b93854
simplify and improve unit test for distance_exp. make some immutable variables const in the DHT implementation. instead of waking up periodically just to check if it's time to refresh the DHT secret key, set the timer to only wake up to refresh the key. If we don't have a DHT observer (to ask for our external IP) or if we don't know our external IP, don't generate a node ID based on 0.0.0.0, just generate a random ID instead. Simplified and improved node replacement logic in the routing table a little bit
2016-01-01 16:42:37 -05:00
Arvid Norberg
ffb78f0378
Merge pull request #312 from ssiloti/export-verify-message
...
export verify_message and incoming_error
2015-12-30 22:51:38 -05:00
Steven Siloti
ac01ccc43a
add templated wrapper around verify_message
...
It was too easy to forget to update the ret and size parameters
when the size of desec changed. With this change we now automatically
get the size of desc and enforce that ret has the same size.
It would be nice if we could use bdecode_node ret[static Size] from C99
but that is not widely supported.
2015-12-29 20:35:36 -08:00
arvidn
197ca4e06d
transition http proxy test for http_connection to the sim
2015-12-22 00:45:16 -05:00
Arvid Norberg
03e90d45d8
Merge pull request #339 from arvidn/dht-storage-test
...
extend the unit test of dht_storage
2015-12-20 02:02:56 -05:00
arvidn
3460f203f3
extend testing of sanitize_append_path_element
2015-12-19 20:11:22 -05:00
arvidn
d7b435ec25
speed up test
2015-12-19 14:59:37 -05:00
arvidn
15ec839d33
extend the unit test of dht_storage
2015-12-19 02:09:06 -05:00
arvidn
121b686a39
add set_web_seeds to torrent_info
2015-12-12 18:36:15 -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
54bf83739d
fix assert in bdecode assert for strings with prefixes of 6 or more digits
2015-12-12 00:19:13 -05:00
arvidn
8732863a9a
another fix to receiving malformed DHT error message
2015-12-03 01:08:27 -05:00
arvidn
550d75dab9
fix warning
2015-11-30 22:59:34 -05:00
arvidn
eb8add0e57
fix missing include
2015-11-30 22:26:10 -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
arvidn
fd3b53604c
add new piece picker logging alert category
2015-11-29 08:25:55 -05:00
arvidn
a8e31fd8ca
add first coverage of test_transfer as a proper sim
2015-11-28 00:59:39 -05:00
arvidn
06b648203f
clean up use of error categories
2015-11-24 00:50:51 -05:00
arvidn
eed17f0bc1
remove the cases from non-sim test that are covered by the new http_connection sim test
2015-11-24 00:39:02 -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
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
Thomas Yuan
c005c937fd
Merge almost same functions.
2015-11-22 22:02:37 -05:00
Steven Siloti
1f13343a70
const correctness
2015-11-22 10:02:26 -08: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
07574117ad
add test for readwritev and experiment with SEH handler in test
2015-11-19 17:58:56 -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
Steven Siloti
08632aa5f7
add unit test to check for multiple calls to done()
2015-11-09 20:47:33 -08:00
arvidn
0c435b42b2
add some more slack to one of the unit tests
2015-11-08 16:26:58 -05:00
arvidn
a138b2daa9
handle receiving an invalid request
2015-11-07 14:58:08 -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
ee714306be
forward port IPv6 IP address resolution in URLs fix
2015-11-01 17:26:45 -05:00
arvidn
475fd61b4b
update ssl certificate for tests
2015-10-25 10:29:42 -04:00
arvidn
ee395bd772
attempt to update SSL certificate for unit test
2015-10-18 01:21:03 -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
2b9cd9bfde
fix build
2015-10-03 12:27:01 -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