arvidn
c0a4f7ba26
fix super seeding assert (forward port from RC_1_0)
2015-09-08 18:17:13 -04:00
Thomas Yuan
4d6de4bcd8
save/load all dht_settings.
2015-09-08 11:03:27 -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
05c580572d
disable simulation on travis osx. fix more warnings
2015-09-06 22:55:42 -04:00
arvidn
a2ea8b32db
fix more warnings
2015-09-06 22:55:41 -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
379fd8ce81
fix simulation build
2015-09-06 22:52:25 -04:00
arvidn
9cb4e3d1ca
forward-port supports_ipv6() fix for linux from RC_1_0 (and fix bug in it)
2015-09-06 20:53: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
43ee75ce02
only post listen_succeeded_alert once all sockets have succeeded, since we may re-open previously successful ones if a later one fails
2015-09-05 22:14:04 -04:00
Arvid Norberg
d7c6a3b3ea
Merge pull request #130 from thomas-yuan/invalid_node_id
...
A node with an invalid node_id, shouldn't be added to routing table.
2015-09-05 13:30:40 -04:00
Thomas Yuan
97217a1fd6
A node with an invalid node_id, shouldn't be added to routing table.
2015-09-04 14:04:49 -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
3ccb4f7dca
use handler allocator for UDP socket read handler
2015-09-02 01:15:02 -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
Arvid Norberg
351798648a
Merge pull request #120 from thomas-yuan/patch1
...
reorganize code to make it straightforward.
2015-08-31 20:25:58 -04:00
Thomas Yuan
71b6b3c262
Fix bug caused by RP #96 .
2015-08-31 18:13:47 -04:00
Thomas Yuan
314f134e35
reorganize code to make it straightforward.
2015-08-31 13:53:49 -04:00
arvidn
0e3e3ea793
add simple unit test for creating hard links
2015-08-30 20:14:55 -04:00
arvidn
434be2bd83
add more logging around the test failure
2015-08-30 08:52:58 -04:00
arvidn
0d9d632465
initial support for disabling proxy for tracker connections
2015-08-29 19:44:54 -04:00
arvidn
ba95aa27d6
cleanup unused code
2015-08-29 16:07:19 -04:00
arvidn
0f760d3fb4
expand tracker unit test to assert the session correctly receives the right peers
2015-08-29 16:04:35 -04:00
arvidn
5757b0ad13
polish some behavior when setting piece and file priorities for torrents with no metadata. Fix the initialization order of peers once we do get the metadata
2015-08-29 10:21:15 -04:00
arvidn
beb5455331
add disk I/O read asserts and fix i2p issue if a tracker responds with i2p peers when i2p is not configured on the client
2015-08-28 07:20:21 -04:00
arvidn
6012306557
add more asserts for the size of the bitfields peers send
2015-08-27 21:48:52 -04:00
Alden Torres
88b1063f13
The constant siocgifmtu is used in the context of all these macros.
2015-08-26 17:46:54 -04:00
arvidn
d1768b9c4c
extend settings_pack unit test
2015-08-24 18:48:43 +02:00
arvidn
82a3683f7d
polish removal of web seeds logic
2015-08-23 11:01:55 +02:00
Alden Torres
5be9dfb6db
Removed unnecessary call to node_id copy constructor.
2015-08-22 16:01:53 -04:00
arvidn
e7b8b6da49
forward port DHT routing table fix from RC_1_0
2015-08-22 15:51:28 +02:00
Arvid Norberg
746cd4c1a6
Merge pull request #96 from thomas-yuan/master
...
Parsing message correctly when message type is error.
2015-08-22 10:42:01 +02:00
arvidn
d43af6e3b7
remove functionality to initiate MTU based on the MTU on the nic (this is error prone and has questionable value)
2015-08-22 08:09:09 +02:00
arvidn
a42f9e0c63
fix more warnings
2015-08-22 00:28:12 +02:00
arvidn
42fdd0f896
fix some more warnings
2015-08-21 22:56:57 +02:00
arvidn
4873004df7
warnings as errors
2015-08-21 14:52:07 +02:00
arvidn
d8065b8941
fix some warnings
2015-08-21 14:03:16 +02:00
arvidn
26b721973f
fix typo
2015-08-21 10:43:14 +02:00
arvidn
b7b0dafcca
fix some warnings
2015-08-21 10:05:51 +02:00
arvidn
904da120d7
fixed some warnings
2015-08-20 22:28:00 +02:00
arvidn
fa450b4bf7
attempt to fix invalid vector subscript bug in piece_picker
2015-08-20 21:37:22 +02:00
Arvid Norberg
ef47b5f33f
Merge pull request #105 from aldenml/torrent-alert-constructor
...
Recoded torrent_alert constructor logic to build the name.
2015-08-20 21:36:30 +02:00
arvidn
40a67ecbc8
fix unknown pragma warning on msvc
2015-08-20 21:14:39 +02:00
Alden Torres
203605bd3a
Recoded torrent_alert constructor logic to build the name.
...
Fixed compilation issue in Mac OS X.
2015-08-20 13:57:03 -04:00
Thomas
dbfc2fd5ea
Parsing message correctly when message type is error.
...
Also, an error response should call reply() of observer, instead of timeout().
Reference: http://www.libtorrent.org/dht_store.html#errors
2015-08-19 22:20:48 -04:00
arvidn
8cf8e65861
turn linked_list into a template to improve type safety and remove some casts
2015-08-20 02:02:46 +02:00
arvidn
ffa870d280
fixed some GCC warnings
2015-08-20 01:33:20 +02:00
arvidn
bd177a857f
make tailequeue a template, introduce type safety, remove old-style casts
2015-08-19 15:22:05 +02:00
arvidn
a3608a39fe
fix some warnings
2015-08-19 02:00:46 +02:00
Arvid Norberg
6bcac425f1
Merge pull request #95 from arvidn/postpone_dht_start
...
DHT router name lookups
2015-08-19 01:44:26 +02:00
arvidn
8bc4bf1e1a
remove incorrect check for m_dht
2015-08-19 01:43:44 +02:00
arvidn
5c8fc818c1
fix more warnings
2015-08-19 01:39:01 +02:00
arvidn
347d976a70
since starting the DHT can be delayed now, also cache dht nodes added while waiting
2015-08-18 23:35:27 +02:00
arvidn
cc4368b45a
attempt to postpone DHT until all outstanding dht router name lookups complete
2015-08-18 22:56:00 +02:00
arvidn
a3c4a0a3e6
attempt to fix msvc build
2015-08-18 21:40:22 +02:00
arvidn
26fecaf037
fix more warnings
2015-08-18 16:42:03 +02:00
arvidn
12da02ae52
fix some warnings
2015-08-18 09:33:00 -04:00
arvidn
8d8c049d9e
fix warnings and invalid defines in disk_io_thread.cpp
2015-08-18 07:55:50 -04:00
arvidn
f6b86dc4b5
add typesafety to piece_picker torrent_peer pointers. and fix a few incorrect uses
2015-08-18 04:25:13 -04:00
arvidn
eecdd3121d
fix some build warnings
2015-08-17 09:01:43 -04:00
arvidn
b1a3a36eae
remove some old leftover code from upnp
2015-08-16 12:21:39 -04:00
arvidn
9a0092c120
fix some warnings
2015-08-16 12:17:23 -04:00
arvidn
16bb2de6ed
fix some warnings
2015-08-13 23:52:25 -04:00
arvidn
225b82d9a0
move test_trackers_extensions over to a simulation and some minor metadata extension and tracker re-announce fixes
2015-08-13 23:07:04 -04:00
arvidn
2c89fa40e2
fix up i2p merge
2015-08-13 22:22:20 -04:00
Arvid Norberg
68bc4f2cf4
Merge pull request #12 from mlt/wip/i2p
...
Few i2p fixes
2015-08-13 21:55:27 -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
213958f98d
uTP timeout fix. introduced when fixing the recent vulnerability
2015-08-12 23:05:33 -04:00
arvidn
d2819cd1b9
fix uninitialized variable in test_pe_crypto simulation
2015-08-12 20:18:47 -04:00
arvidn
243b31b56b
trouble shoot segfault on travis
2015-08-12 18:54:57 -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
Steven Siloti
1b4b1c4403
fix error handling for DHT direct requests
2015-08-10 20:33:05 -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
1ff48aef60
add comment
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
arvidn
a81ca2391b
fix some warnings
2015-08-10 20:03:24 -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
1cbd9a9d5e
make ssthresh set less aggressive in uTP
2015-08-07 21:31:59 -04:00
Arvid Norberg
e3c9e75452
Merge pull request #72 from aldenml/peer-connection-null-error
...
Avoid a possible null pointer error when logging in on_connection_complete
2015-08-07 00:54:39 -04:00
arvidn
97571b4ad4
fixed more warnings
2015-08-07 00:30:29 -04:00
Alden Torres
1356332496
Avoid a possible null pointer error when logging on peer_connection::on_connection_complete.
2015-08-07 00:30:28 -04:00
arvidn
a91e7ce25d
fix warnings
2015-08-06 02:30:06 -04:00
arvidn
788e41c3bb
merged udp socket fallback fix from RC_1_0
2015-08-05 22:22:57 -04:00
arvidn
fb34607313
fix crash when loading a resume file where all files have priority 0 (and the torrent finishes before having downloaded anything) and add unit test for this case
2015-08-05 20:13:58 -04:00
Alden Torres
eef9f16b3b
Removed unused flag bandwidth-limit-logging and related code.
2015-08-04 01:47:15 -04:00
Alden Torres
94c59354fa
Removed minimal optimization inside silly_hash to avoid another include.
2015-08-03 23:01:46 -04:00
Alden Torres
5866bb7974
Indentation.
2015-08-03 18:16:43 -04:00
Alden Torres
a1a8e1fc48
Avoid performance penalty if disk write access log is not enable.
2015-08-03 18:16:43 -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
7080b8bac8
fixed build
2015-08-02 02:16: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
arvidn
f86283ac30
allow clearing the notify function in alert manager
2015-07-30 21:34:55 -04: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
3dda8f97d6
merge include fix from RC_1_0
2015-07-30 20:23:35 -04:00
arvidn
4d89c7da97
fixed uTP vulnerability
2015-07-29 22:25:59 -04:00
Alden Torres
57f14808d8
Restore the option to compile with target Windows XP.
2015-07-29 14:56:31 -04:00
arvidn
5657772114
limit how often the DHT can wake up
2015-07-28 23:04:15 -04: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
29c618c3e5
merge bittorrent-slow start fix from RC_1_0
2015-07-27 16:53:25 -07:00
arvidn
f34f09ca58
merge more lenient utf8 conversion from RC_1_0
2015-07-27 08:59:38 -07:00
arvidn
105c105867
merge seed mode test and fixes from RC_1_0
2015-07-27 00:01:19 -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
423a18ecb1
add missing include
2015-07-25 08:58:32 -07:00
arvidn
40c7596da9
merge loading of piece priorities from resume data fix from RC_1_0
2015-07-24 22:34:53 -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
arvidn
6c5aec3476
fix request queue size performance issue
2015-07-20 08:20:17 -07:00
arvidn
6c7c0cd878
fix up some old logging defines and improve the log output for send buffer watermark and request queue length
2015-07-17 23:54:25 -04:00
arvidn
51dd174303
fix performance issue when receiving UDP packets (the udp tracker would not reject DHT packets immediately)
2015-07-17 18:48:20 -04:00
arvidn
f85d62b601
merged DHT update of /8 blocks form RC_1_0
2015-07-16 21:56:06 -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
Arvid Norberg
3340bbbfb4
Merge pull request #32 from ssiloti/peer_connection_handle
...
peer_connection_handle
2015-07-14 22:51:34 -04:00
Jakob Petsovits
08a6ba4161
Avoid a warning if BOOST_ASIO_DECL was defined but empty.
2015-07-14 21:08:57 -04:00
Jakob Petsovits
4853d0250f
Avoid a warning if _BSD_SOURCE is already defined.
...
As _BSD_SOURCE has been deprecated since glibc 2.20, also add
_DEFAULT_SOURCE to the definitions. Both can be any value as long
as they're defined, so in order to save two lines, just #undef
them instead of checking with #ifdef/#endif.
2015-07-14 21:07:05 -04:00
Jakob Petsovits
27fe9822ad
m_num_peers is a regular int, not long: print %d instead of %ld.
2015-07-14 17:49:12 -04:00
Mikhail Titov
2751d90368
Don't store 0.0.0.0 for i2p peers in resume data
2015-07-14 14:13:17 -05:00
Mikhail Titov
9c489e2291
Don't include yourip (0.0.0.0) in i2p handshake
2015-07-14 14:13:16 -05:00
Mikhail Titov
70a99e6f62
Don't attempt to resolve base64 destination for i2p tracker
2015-07-14 14:13:15 -05:00
Mikhail Titov
020f0816df
fixup! Don't break SAM connection if error occurs
...
Propagate i2p result code, related to #3
2015-07-14 14:13:14 -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
fda379729c
There is no need to escape self i2p ip in Base 64
2015-07-14 14:13:12 -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
761486ce43
Using PRId64 macro for portability.
2015-07-12 13:05:29 -04:00