Alden Torres
d60ddf6786
Minor change: #ifdef -> #if
2015-08-13 18:43:58 -04:00
Alden Torres
9e29eb9978
Introduced TORRENT_UTP_LOG_ENABLE macro to guarantee that TORRENT_UTP_LOG and TORRENT_VERBOSE_UTP_LOG are always defined (no need to change a lot of macro if).
2015-08-13 18:43:58 -04:00
Alden Torres
12fb68e8e3
Refactor of utp stream logging functions.
...
Renamed utp-stats option to utp-log.
2015-08-13 18:43:58 -04:00
Alden Torres
02afc8b640
Added utp-stats bjam option to enable utp stream log (utp.log file).
2015-08-13 18:43:58 -04:00
arvidn
d2819cd1b9
fix uninitialized variable in test_pe_crypto simulation
2015-08-12 20:18:47 -04:00
Alden Torres
b303a36ac2
Removed unnecessary full namespace reference to udp::endpoint in new dht_direct_request feature.
...
Add default value to userdata argument in dht_direct_request.
Minor spelling fix.
2015-08-12 00:49:09 -04:00
Alden Torres
2457b16d09
Documented that portmap_log_alert is only posted if port_mapping_log_notification is enabled.
2015-08-12 00:10:32 -04:00
Alden Torres
1805c96f44
Created a new port_mapping_log_notification alert category to separate portmap_log_alert.
2015-08-12 00:07:08 -04:00
Steven Siloti
1b4b1c4403
fix error handling for DHT direct requests
2015-08-10 20:33:05 -07:00
Steven Siloti
135f4761e1
add more comments about DHT direct requests
2015-08-10 20:33:04 -07:00
Steven Siloti
8e00172af7
return a bdecode_node rather than taking one by reference
2015-08-10 20:33:04 -07:00
Steven Siloti
43dc784cf2
add direct_request.hpp to Makefile.am
2015-08-10 20:33:04 -07:00
Steven Siloti
3564562dab
pass raw buffer in dht_direct_response_alert
2015-08-10 20:33:04 -07:00
Steven Siloti
182c30f2d6
fix typo in class name
2015-08-10 20:33:04 -07:00
Steven Siloti
86fd8c3048
enable arbitrary direct dht requests and extension dht requests
...
If you're wondering why I used an alert for handling responses but not requests,
it's because the former was easy to do that way but the latter would have
involved some major refactoring or kludging. The DHT node is written with the
(IMO reasonable) assumption that all responses will be generated immediately, so
there was no way to easily accommodate getting a response asynchronously via
an alert.
2015-08-10 20:33:04 -07:00
Steven Siloti
a29e64965c
add some basic operators to peer_connection_handle
2015-08-10 20:33:04 -07:00
arvidn
a81ca2391b
fix some warnings
2015-08-10 20:03:24 -04:00
arvidn
d977f2e68f
attempt to make appveyor happy
2015-08-09 17:54:10 -04:00
arvidn
4fa0aa62da
simulate IP routes, interfaces and page size when building in simulation mode
2015-08-09 15:01:01 -04:00
arvidn
6068418def
fix and re-enable simulations
2015-08-09 00:56:37 -04:00
arvidn
1c1698459c
fix warnings
2015-08-08 22:53:11 -04:00
Arvid Norberg
27c5a28637
Merge pull request #70 from thomas-yuan/master
...
Call callback function immediately when get data for mutable data.
2015-08-08 21:51:18 -04:00
Thomas
e51b61870a
Call callback function immediately when get mutable data.
2015-08-08 20:28:53 -04:00
arvidn
72286eb0dc
minor asio.ssl abstraction cleanup. update libsimulator with build fix. only run simulator on one of the build variants on travis, since the simulator does not support ssl
2015-08-08 16:19:44 -04:00
arvidn
50925d7652
fix some more warnings
2015-08-08 02:48:01 -04:00
arvidn
46803b75f8
support building libtorrent in simulation mode (using libsimulator, which is a git submodule)
2015-08-07 21:31:59 -04:00
arvidn
a91e7ce25d
fix warnings
2015-08-06 02:30:06 -04:00
Alden Torres
eef9f16b3b
Removed unused flag bandwidth-limit-logging and related code.
2015-08-04 01:47:15 -04:00
Alden Torres
cd8a4d2511
Moved TORRENT_DISK_STATS to default_storage with the option of enable/disable at runtime.
2015-08-03 18:16:43 -04:00
arvidn
e0c3d28321
fix some warnings
2015-08-02 15:55:05 -04:00
arvidn
bb64887f30
merge total wanted fix from RC_1_0
2015-08-02 15:18:21 -04:00
arvidn
655a3ae019
fix some warnings
2015-08-01 23:57:11 -04:00
arvidn
990aabe36f
fix warnings and no-deprecated functions build
2015-08-01 19:55:36 -04:00
Steven Siloti
30e43a6595
add default NULL ctor to session_handle
2015-08-01 15:48:32 -07:00
arvidn
52b4aed466
merge bdecode patch from RC_1_0. an empty string now produces an error rather than an empty bdecoded struct
2015-07-30 21:29:22 -04:00
arvidn
75dc8b7997
fix python binding build with no deprecated functions
2015-07-27 23:09:24 -07:00
arvidn
7f695f05d5
use boost.asio as headers only library again (simplify builds and hopefully fix shared linking of python module on gcc linux)
2015-07-27 23:09:24 -07:00
arvidn
1a4c017ec5
merged torrent_info constructor fix (python bindings) from RC_1_0
2015-07-25 16:40:07 -07:00
Arvid Norberg
742548b69c
Merge pull request #49 from ssiloti/plugin-exported-api
...
Only use exported types in the plugin api
2015-07-25 15:53:22 -07:00
Steven Siloti
e6b3df3696
pass torrent_handle by const ref in the plugin api
2015-07-25 09:57:55 -07:00
Steven Siloti
72dcc20073
pass peer_connection_handle by const ref in the plugin api
2015-07-25 09:15:24 -07:00
Steven Siloti
e0e06bc87a
switch to peer_connection_handle for optimistic unchoking
...
This is necessary to enable external plugins since the vector is passed to
plugins via on_optimistic_unchoke.
2015-07-23 20:48:35 -07:00
Steven Siloti
2c1f24c036
switch to session_handle in plugin api
2015-07-23 20:13:32 -07:00
Steven Siloti
fbc67b4e21
switch to torrent_handle in plugin api
2015-07-23 19:52:23 -07:00
arvidn
bb705e9a52
improved seed-mode handling (seed-mode will now automatically be left when performing operations implying it's not a seed). fixed issue with file priorities and override resume data
2015-07-21 10:12:37 -07:00
Arvid Norberg
a1b73317ce
Merge pull request #37 from jpetso/master
...
Progress towards a workable CMake build
2015-07-20 09:49:37 -07:00
arvidn
6c5aec3476
fix request queue size performance issue
2015-07-20 08:20:17 -07:00
arvidn
9231476ac6
employ variadic templates and perfect forwarding for peer connection asio handler allocator
2015-07-20 06:44:58 -07:00
arvidn
2439ec55c1
clean up in utp_stream.hpp
2015-07-17 22:01:45 -04:00
arvidn
7b379b1740
improve documentation for protocol encryption
2015-07-17 21:59:10 -04:00
Jakob Petsovits
2a22ecfcce
Remove unused mentions of non-existent class.
2015-07-17 20:13:14 -04:00
arvidn
7a3cabfe12
fixed some resume issues, specifically around file priorities and override resume data
2015-07-16 21:56:06 -04:00
arvidn
a65b71b855
improve logging of adding peers and the state of torrents. the default flags for the external connect_peer() call now assumes encryption, uTP and holepunch support
2015-07-16 21:53:31 -04:00
Mikhail Titov
70a99e6f62
Don't attempt to resolve base64 destination for i2p tracker
2015-07-14 14:13:15 -05:00
Mikhail Titov
3f2e660fcf
Wait for i2p acceptor before announcing
...
This somewhat closes #1 in an ugly way
2015-07-14 14:13:13 -05:00
Mikhail Titov
df21a7e8ce
Use scrape & i2p bitset flags for request
2015-07-14 14:13:10 -05:00
Mikhail Titov
5d3938b39b
Parse compact response from I2P tracker
...
This fixes #2
2015-07-14 14:13:09 -05:00
Mikhail Titov
007a580207
Options to use lowercase base32 encoding without padding
2015-07-14 12:41:12 -05:00
Steven Siloti
d911ed456a
stub out disabled functions rather than removing them
2015-07-12 20:17:45 -07:00
Steven Siloti
825fd22c1e
cut down on the size of the peer_connection_handle interface
2015-07-12 16:31:29 -07:00
Steven Siloti
9bf1d6c5e9
peer_connection_handle
2015-07-12 14:40:03 -07:00
Alden Torres
73e5f795cb
Merge with master.
2015-07-12 10:37:16 -04:00
Alden Torres
a856ae6e9b
Added dht_get_peers and dht_announce at session level.
...
Refactored dht_put_item to dht_put_immutable_item in session_impl since the get operations are not overloaded (consistency).
Added allow_threading_guard to add_dht_node python binding.
Making dht_put_item in session returns a zeroed hash if TORRENT_DISABLE_DHT (avoid unnecessary calculation and it's more consistent).
Added missing DHT operations to the python binding.
Added missing allow_threading_guard to add_dht_node in the python binding.
2015-07-12 10:37:16 -04:00
arvidn
2739def57f
minor cleanups. use libtorrent typedefs for asio. failing to bind IPv6 UDP socket is no longer fatal. removed some redundant listen_failed_alerts
2015-07-11 23:01:27 -04:00
Steven Siloti
189afdd5e3
add session_handle.hpp to Makefile.am
2015-07-11 11:17:28 -07:00
Steven Siloti
1d55bcba72
make session inherit from session_handle and remove wrapper functions
2015-07-11 11:17:28 -07:00
Steven Siloti
b072b0ca5f
create session_handle
...
The session_handle class exposes the same public interface to session_impl as
the session class. The difference being that session_handle does not own the
underlying session_impl so multiple session_handle instances can be created
and copied about as needed.
The intent is to chenge the plugin API to pass an instance of session_handle
instead of a pointer to session_impl. This change will be made in a separate
patch.
To maintain ABI compatibilty, the type signature of session was not changed.
The relevent functions have been modified to forward to session_handle and
all enums have been left in session.
2015-07-11 11:17:28 -07:00
arvidn
c5614b691f
export file_progress class when building unit tests. fix to web_server.py (used for unit tests)
2015-07-07 23:46:33 -04:00
arvidn
3b3a23a87a
whitespace
2015-07-05 18:33:47 -04:00
Arvid Norberg
41eff1801e
Merge pull request #13 from aldenml/more-dht-api
...
Added dht_get_peers and dht_announce at session_impl level.
2015-07-04 10:08:14 -04:00
John Sebastian Peterson
cc67c60938
hide cx keyword from winrt
...
instead of a hacky undef that break the keyword
2015-07-04 06:04:06 +02:00
Alden Torres
e7ee3590fa
Simplified dht_get_peers_reply_alert memory handling to work with only one allocation and return all peers at once.
2015-07-03 22:59:44 -04:00
John Sebastian Peterson
30142e35ac
conform crypt api detection to coding standard
2015-07-04 01:42:33 +02:00
John Sebastian Peterson
7f160e42a5
fix c++/cx interface name conflict in alerts
2015-07-02 09:58:12 +02:00
John Sebastian Peterson
02cee0e96e
add winrt detection
2015-07-02 09:55:29 +02:00
Alden Torres
d9246d12c4
Re-implemented dht_get_peers_reply_alert using the stack_allocator for peers vector storage.
2015-07-01 15:30:09 -04:00
Alden Torres
cbba63ce94
Created new alert category for pure DHT operations.
2015-07-01 15:30:08 -04:00
Alden Torres
fcac7140f8
Added dht_get_peers and dht_announce at session_impl level.
2015-07-01 15:30:08 -04:00
arvidn
94d6e06c97
first step in making opening all the listen sockets a bit more reliable
2015-06-29 23:10:09 -04:00
arvidn
d1670c72c2
removed sparse-regions support
2015-06-29 20:40:32 -04:00
arvidn
d887f5719d
it's called peer_list now
2015-06-29 19:56:39 -04:00
arvidn
e2784df13c
factor out file progress tracking from the torrent class
2015-06-28 22:47:11 -04:00
arvidn
2d1db68ea6
fix diagnostic push/pop issue
2015-06-28 18:44:37 -04:00
Steven Siloti
d7a3b05fdc
remove inaccurate comment about deadlocking in torrent_handle
2015-06-27 11:22:13 -07:00
Arvid Norberg
8dbef2d32a
Merge pull request #11 from aldenml/announce-get_peers-refactor
...
Refactor to expose a more convenient get_peers function as part of the DHT api.
2015-06-25 00:33:15 -04:00
Alden Torres
5c8c9cd653
Refactor to expose a more convenient get_peers function as part of the DHT api.
...
Now announce (a particular case of get_peers DHT operation) uses the function get_peers.
2015-06-24 21:22:24 -04:00
Mikhail Titov
3d448402a4
Don't attempt to find_peers in peer_list for i2p
...
This closes #7
2015-06-24 19:41:32 -05:00
arvidn
6621a1ba1a
documentation fix
2015-06-21 22:54:12 -04:00
arvidn
8b66fbe194
fix bug in previous commit
2015-06-20 18:17:49 -04:00
arvidn
bc849b8d07
fixed typo in config.hpp
2015-06-20 16:50:44 -04:00
arvidn
3755a77a64
attempt to trouble shoot missing backtraces on linux
2015-06-20 16:36:23 -04:00
arvidn
1450a692e4
fix test_identify_client build with deprecated functions turned off
2015-06-19 23:54:38 -04:00
Alden Torres
5e2e4bbb01
Minor syntactic change to avoid compiler warning about comma at the end of enum element.
2015-06-18 14:50:13 -04:00
arvidn
f36d360b8b
merged fix from RC_1_0
2015-06-17 17:40:38 -04:00
arvidn
323af56cc2
update interest when changing upload-only mode
2015-06-16 01:24:35 -04:00
arvidn
5cb095f6d2
support using 0 disk threads (to perform disk I/O in network thread)
2015-06-14 16:00:04 -04:00
arvidn
db76ba759d
improve some tests
2015-06-14 15:48:11 -04:00
arvidn
aa6598b2e6
don't return an internal session_settings type from the session, return a settings_pack instead
2015-06-07 00:23:30 -04:00
arvidn
a3d397e194
fix python binding build issue
2015-06-06 17:38:46 -04:00
arvidn
9af8841244
remove some unnecessary asio typedefs in the libtorrent namespace, just pull ip::tcp and ip::udp
2015-06-06 13:49:18 -04:00
arvidn
41533205be
drop support for boost 1.35 and fix some more references to the asio namespace
2015-06-06 02:10:53 -04:00
arvidn
389ffc622c
don't pull in the asio namespace in libtorrent. refer to it by boost::asio
2015-06-06 01:24:25 -04:00
arvidn
5841822f73
fix ambiguous session constructor
2015-06-05 02:38:07 -04:00
arvidn
15dd15d0d6
fix no-deprecated build. extend .travis.yml to build the 3 test configurations too. rename README to README.rst
2015-06-05 02:31:52 -04:00
arvidn
086723dd76
attempted glibc build fix
2015-06-04 21:44:24 -04:00
Arvid Norberg
d43f7b56a2
update copyright year
2015-06-03 05:18:48 +00:00
Arvid Norberg
b5a30a65ae
merged changes from RC_1_0
2015-06-03 05:12:54 +00:00
Arvid Norberg
4e1e53f066
turn some more members of session_impl to private
2015-06-03 04:33:20 +00:00
Arvid Norberg
0351326add
separate the main thread and the io_service from session_impl. The io_service object is now simply run() in the main thread, all initialization is done by posting messages to it. This generalizes session_impl to some degree, enables future expansion to run in multiple threads (although, the peers and torrents don't support this). This patch also makes it possible to pass in a third party io_service to the session, but at this point that's mostly useful for tests, as it's not well supported
2015-06-03 03:04:44 +00:00
Arvid Norberg
5d6cba438d
merged changes from RC_1_0
2015-06-02 01:14:52 +00:00
Arvid Norberg
3409c782f8
merged changes from RC_1_0
2015-05-31 21:57:38 +00:00
Arvid Norberg
c8443d0c7c
msvc fixes
2015-05-31 12:21:16 +00:00
Arvid Norberg
91197005e9
more msvc fixes
2015-05-31 09:02:42 +00:00
Arvid Norberg
84849f3afd
some msvc fixes
2015-05-30 21:46:59 +00:00
Arvid Norberg
34f6b1ca19
merged RC_1_0 into trunk
2015-05-30 17:41:38 +00:00
Arvid Norberg
f9c9d0ad0d
merge small unit tests to make running the tests quicker. expand the test framework a bit. add ax_boost_random.m4 script to link against boost.random correctly from makefile.
2015-05-30 04:31:23 +00:00
Arvid Norberg
9b0313bd8e
hold settings_pack by shared_ptr when passing it across thread boundaries. don't allocate it on the heap redundantly
2015-05-29 05:27:53 +00:00
Arvid Norberg
e44c8e9002
optimize logging of DHT packets by deferring copying and printing, to only do it if the alert category is enabled
2015-05-28 20:36:22 +00:00
Arvid Norberg
27cbfa164e
minor cleanup
2015-05-28 14:46:12 +00:00
Arvid Norberg
06bf225237
fix release build and tune want_tick
2015-05-26 20:09:19 +00:00
Arvid Norberg
09bc072c31
inactive/auto managed fixes. fix client_test key input
2015-05-26 18:39:49 +00:00
Arvid Norberg
c6f8dd408a
optimize recalculate auto-managed
2015-05-25 21:46:42 +00:00
Arvid Norberg
9856a1fe0c
break out more tests from test_primitives
2015-05-23 01:38:47 +00:00
Arvid Norberg
0052fa6c19
some cleanup to dht observers (don't expose internals)
2015-05-22 02:42:26 +00:00
Arvid Norberg
1b93f1e4b8
fix override function signature on alerts
2015-05-22 02:34:22 +00:00
Arvid Norberg
607e708bc4
fix warnings
2015-05-19 03:13:49 +00:00
Arvid Norberg
051ca6b22c
fix warnings
2015-05-18 05:32:18 +00:00
Arvid Norberg
abf9c83732
whitespace
2015-05-18 05:06:07 +00:00
Arvid Norberg
9ee98b3ed1
fix build warnings
2015-05-18 05:04:55 +00:00
Arvid Norberg
e7d369646d
fix gcc warnings
2015-05-18 01:30:32 +00:00
Arvid Norberg
71ee44ae5e
fix build issue, some warnings
2015-05-17 23:32:13 +00:00
Arvid Norberg
b480f40a98
fix linux build and update code coverage script
2015-05-17 21:00:47 +00:00
Arvid Norberg
9597dcda87
throw when packet_buffer fails to allocate memory
2015-05-17 15:23:39 +00:00
Arvid Norberg
58ae099cf8
clean up disk_io_job a bit to avoid old-style casts
2015-05-16 20:41:37 +00:00
Arvid Norberg
99de70604a
remove dht-verbose logging build configuration. tie it to the main logging configuration (which now is on by default) and make it less costly when dht logging alerts are disabled
2015-05-16 19:29:49 +00:00
Arvid Norberg
12c9d3de26
fix more warnings
2015-05-16 18:35:47 +00:00
Arvid Norberg
259e094316
fix warnings
2015-05-16 07:21:23 +00:00
Arvid Norberg
2bf4519bee
make the torrent hold a pointer to the ip_filter instead of relying on a session reference
2015-05-16 06:33:37 +00:00
Arvid Norberg
a44731aabb
merged fixes from RC_1_0 and regenerated documentation
2015-05-12 06:23:14 +00:00
Arvid Norberg
494b425ea1
fix warnings and a peer logging bug
2015-05-10 18:38:10 +00:00
Arvid Norberg
0029ac62a8
add unit test for extract_peer_info
2015-05-10 18:24:38 +00:00
Arvid Norberg
242dad0743
fix dht build
2015-05-10 18:24:09 +00:00
Arvid Norberg
2819d5f68e
remove the remains of the dht logging
2015-05-10 05:28:50 +00:00
Arvid Norberg
1357fd5265
clean up usage of printf attribute (encapsulate it in a macro)
2015-05-10 05:11:51 +00:00
Arvid Norberg
b60934288b
turn DHT logging into alerts instead of writing to a file
2015-05-10 04:54:02 +00:00
Arvid Norberg
095b709adb
rename bitfield::bytes() -> bitfiele::data()
2015-05-09 19:07:33 +00:00
Arvid Norberg
ca581f2258
rename dht::node_impl -> dht::node, since this hasn't been a pimpl for quite a while
2015-05-09 19:00:22 +00:00
Arvid Norberg
6557910c7f
remove the DHT's last dependency on session_impl
2015-05-09 18:06:02 +00:00
Arvid Norberg
b3d7668e7a
properly report errors when failing to generate randomness
2015-05-09 04:08:32 +00:00
Arvid Norberg
3218931495
properly throw on failing to allocate memory in buffer and bitfield
2015-05-09 03:56:57 +00:00