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
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
Alden Torres
89f3b3bee3
Using the standard log method for round trip time in rcp_manager.
2015-07-12 12:59:38 -04: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
42638c3540
don't ignore errors from setup_listener()
2015-07-11 23:16:37 -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
arvidn
ed8e4135b2
move include statement to correct place
2015-07-11 22:04:04 -04:00
arvidn
2ab445135a
only retry binding the socket to a new port if the last attempt failed with address-in-use. On other errors, give up immediately
2015-07-11 18:49:53 -04: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
2b05b1c85c
fix cppcheck warnings
2015-07-11 10:36:13 -04:00
Chocobo1
b5486fb6ce
Add parentheses
2015-07-11 15:23:55 +08:00
Arvid Norberg
bbe51268d3
Merge pull request #23 from Chocobo1/igd_version
...
Add support for IGD version 2
2015-07-10 19:20:51 -04:00
Chocobo1
f92df7f782
Add support for IGD version 2
2015-07-09 20:11:23 +08:00
Arvid Norberg
b472299524
Merge pull request #21 from john-peterson/build2
...
hike required windows version to vista
2015-07-07 22:39:08 -04:00
John Sebastian Peterson
5a2dc432b1
remove windows version from code file
...
because it should be in the build files
2015-07-07 07:50:28 +02:00
Arvid Norberg
d756969e90
Merge pull request #20 from john-peterson/rt3
...
fix hide cx keyword from winrt
2015-07-06 17:44:35 -04:00
arvidn
1c708cca28
fix build
2015-07-05 21:41:53 -04:00
John Sebastian Peterson
9a5e3465d2
fix hide cx keyword from winrt
...
forgot to hide it in the source file
2015-07-06 03:11:41 +02:00
arvidn
78399f7968
shave off some includes in torrent.cpp
2015-07-05 19:32:13 -04:00
arvidn
a63cfd2a95
improve logging (specifically don't emit bandwidth limiter logs when it's disabled)
2015-07-05 18:44:02 -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
bb25acd661
use a better windows.foundation.collections.h(462) conflict fix
2015-07-04 05:59:38 +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
Alden Torres
acc130833a
Better handling of memory layout and use of detail io functions (thanks to @arvidn comments).
2015-07-02 21:35:59 -04:00
John Sebastian Peterson
e7caa2d20f
fix winrt compile error in windows.foundation.collections.h(428)
2015-07-02 09:58:17 +02:00
John Sebastian Peterson
2bbb238b4b
use getfileattributes successor to support winrt
2015-07-02 09:55:34 +02:00
John Sebastian Peterson
cc8a77b363
use createsemaphore and waitforsingleobject successor to support winrt
2015-07-02 09:55:33 +02:00
Alden Torres
c89f89511b
Forgot to add the very important alloc offset.
2015-07-01 15:30:09 -04:00
Alden Torres
f772675d95
Removed uTP implied port logic from dht_announce.
2015-07-01 15:30:09 -04: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
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
a754559ac6
improve logging aroud binding listen sockets
2015-06-28 09:13:59 -04:00
arvidn
c3347de3bf
attempted fix for cpu_id issues on ubuntu
2015-06-26 23:23:08 -04: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
77ca1ac16f
Quadruple handshake timeout for i2p
2015-06-24 19:40:17 -05:00
arvidn
4054b4374b
whitespace
2015-06-22 23:32:02 -04:00
arvidn
130fc2d640
forward port logging patch from RC_1_0
2015-06-22 02:14:17 -04:00
arvidn
9ff9965dbd
fix typo
2015-06-21 20:49:55 -04:00
arvidn
08016494a9
split up test_http_connection into smaller test cases
2015-06-21 12:41:50 -04:00
arvidn
8b66fbe194
fix bug in previous commit
2015-06-20 18:17:49 -04:00
arvidn
665b553941
merged logging patch from RC_1_0
2015-06-20 17:51:59 -04:00
arvidn
ad8971d6da
fix typo
2015-06-20 16:42:18 -04:00
arvidn
3755a77a64
attempt to trouble shoot missing backtraces on linux
2015-06-20 16:36:23 -04:00
arvidn
c2eaa26ce6
whitespace
2015-06-20 13:44:07 -04:00
arvidn
900330992e
merge documentation update to github from RC_1_0
2015-06-20 00:13:38 -04:00
arvidn
a500ff57be
improve logging of the choker and reliability of the test_auto_unchoke
2015-06-19 01:43:09 -04:00
arvidn
8959971dd3
merge http scrape fix from RC_1_0
2015-06-18 01:05:36 -04:00
arvidn
8d408c4c86
add shortcut in async resolver for raw IPs.
2015-06-16 23:45:05 -04:00
Mikhail Titov
da282fdde0
Don't break SAM connection if error occurs
...
This fixes #3
2015-06-16 02:03:25 -05:00
arvidn
323af56cc2
update interest when changing upload-only mode
2015-06-16 01:24:35 -04:00
Arvid Norberg
75fa65f922
Merge pull request #4 from ssiloti/master
...
Release alert manager mutex before notifying plugins
2015-06-15 22:11:07 -04:00
arvidn
bd2bcf12bc
fix bug on write-only disk errors (it's not supposed to stop the torrent)
2015-06-15 02:27:09 -04:00
Steven Siloti
acf423d422
Release alert manager mutex before notifying plugins
...
A plugin might respond to an alert by doing something which itself generates
an alert. This has become increasingly likely with the use of alerts for
logging. This would cause a deadlock due to trying to recursively aquire the
alert manager mutex.
2015-06-14 14:07:34 -07:00
arvidn
f91799006a
fix make_shared invocation
2015-06-14 16:42:52 -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
0d6e65ec24
improve reliability of some of the unit tests
2015-06-10 01:22:01 -04:00
arvidn
ac04ee5ef3
fix typo in settings_pack
2015-06-07 09:23:04 -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
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
48bc00cbb7
attempt to make unit tests more deterministic
2015-06-05 23:02: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
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
d8c0632c78
add some bdecoding unit tests
2015-06-02 03:06:48 +00:00
Arvid Norberg
d9945f6f50
merged fix from RC_1_0
2015-06-02 01:29:05 +00:00
Arvid Norberg
5d6cba438d
merged changes from RC_1_0
2015-06-02 01:14:52 +00:00
Arvid Norberg
b0eabd532c
some test fixes
2015-05-31 16:14:46 +00:00
Arvid Norberg
91197005e9
more msvc fixes
2015-05-31 09:02:42 +00:00
Arvid Norberg
34f6b1ca19
merged RC_1_0 into trunk
2015-05-30 17:41:38 +00:00
Arvid Norberg
0aca01543b
simplify dht logging
2015-05-30 06:31:03 +00:00
Arvid Norberg
945eef4c4d
some dht_tracker clean up
2015-05-30 04:37:12 +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
7f5aff9823
don't trigger recalculating auto-managed unconditionally when adding a new torrent, only in the case where it will most likely be started right away
2015-05-27 20:21:50 +00:00