arvidn
5bf28e37b8
make create_torrent flags type-safe
2017-08-04 21:23:42 +02:00
arvidn
a8a5986046
make file attributes (in file_storage) type safe
2017-08-04 07:38:57 +02:00
arvidn
6fa181ece8
some cleanup of type-safe flags
2017-07-30 18:20:15 -07:00
arvidn
322007bb6a
make save_state_flags a strong type
2017-07-30 09:06:41 -07:00
arvidn
b38efb6c65
make alert category flags be a strong type
2017-07-26 07:20:47 -07:00
arvidn
c4eb4c8b5f
use span in torrent_info constructors and deprecate the redundant flags argument
2017-07-22 00:00:44 -07:00
Steven Siloti
5eba09fce7
changes based on review feedback
2017-07-21 19:18:44 -07:00
Steven Siloti
f0ae2145ea
use a handle class for listen sockets instead of raw pointers
...
Listen socket handles need to be week_ptr so that they can detect when a listen
socket is removed in the middle of a tracker announce on it. Use a wrapper class
to enforce that no one outside of session_impl can hold ownership of the socket
across event boundaries.
To support unit tests, listen_socket_t is also split into a base class which
holds the members needed to support the public listen socket API.
2017-07-21 19:18:44 -07:00
Steven Siloti
e0dcd34352
convert m_listen_sockets to a vector of shared_ptr
2017-07-21 19:18:43 -07:00
Steven Siloti
0f30815d8f
Revert "don't move listen_socket_t when deleting sockets"
...
This reverts commit 718c5f0dcb
.
2017-07-21 19:18:43 -07:00
arvidn
87ca4bb26f
Fix bug where the resume data would fail to load the piece bitmask for seeds when suggest_cache was enabled
2017-07-21 19:06:02 -07:00
arvidn
c4659bc345
convert peer_flags and peer_source_flags to type-safe flags
2017-07-17 10:22:32 -07:00
arvidn
4947602a2f
make add_torrent_params::flags_t an enum class and move it out into its own header
2017-07-17 01:05:31 -07:00
AllSeeingEyeTolledEweSew
00655d562b
Refactor several flags to torrent_handle::get_flags/set_flags.
2017-07-17 01:05:31 -07:00
arvidn
73942de97a
carve out peer_list_entry into also being deprecated (it was only used by deprecated functions and some tests)
2017-07-16 19:20:29 -07:00
toinetoine
b1c3e12cd0
added block_uploaded_alert to allow client to track upload activity
2017-07-16 11:04:03 -07:00
arvidn
c4afb5e949
use a dedicated class template for flags types instead of enum class. It's more backwards compatible and improves ergonomics
2017-07-15 01:15:57 -07:00
arvidn
0f2af8c3ef
disable msvc warning 4503
2017-07-13 22:24:29 -07:00
arvidn
c692147c94
merged RC_1_1 into master
2017-07-13 19:55:29 -07:00
arvidn
cc30434c52
fix inconsistency in file_priorities and override_resume_data behavior. file_priorities are not subject to the override_resume_data flag
2017-07-12 15:36:55 -07:00
pavel.pimenov
a422af1a7b
remove call _strchr
...
_TEXT SEGMENT
_c$ = 8 ; size = 1
?is_space@@YA_ND@Z PROC ; is_space, COMDAT
; 8 : static const char* ws = " \t\n\r\f\v";
; 9 : return strchr(ws, c) != nullptr;
movsx eax, BYTE PTR _c$[esp-4]
push eax
push DWORD PTR ?ws@?1??is_space@@YA_ND@Z@4PBDB
call _strchr
add esp, 8
neg eax
sbb eax, eax
neg eax
; 10 : }
2017-07-12 15:34:45 -07:00
d-komarov
85cf521145
fix bandwith rate limit calculation ( #2134 )
...
back-port of fc0cbfb789
2017-07-11 21:35:12 -07:00
Steven Siloti
2e79c5e648
fix handling of SSL listen sockets
2017-07-10 21:41:39 -07:00
Steven Siloti
389b4eb3f2
make listen_socket_t non-copyable and non-movable ( #2137 )
...
The DHT stores a pointer to this struct so it must not be copied or moved once
it is stored in m_listen_sockets.
2017-07-10 10:14:36 -07:00
Steven Siloti
718c5f0dcb
don't move listen_socket_t when deleting sockets
...
Pointers to listen_socket_t are stored in dht_tracker, so they
cannot be copied or moved once they are added to m_listen_sockets.
listen_socket_t should really be made non-copyable and non-moveable, but the
socket creation path needs to be refactored before that can be done.
2017-07-08 08:42:04 -07:00
arvidn
6425cfbc4f
tests should not fail by failing to clean up. Make clean up more reliable on windows
2017-07-04 10:21:23 -04:00
Steven Siloti
ec2fb91aa5
reject put messages with incorrect bencoding ( #2118 )
...
add function to check for soft bdecode errors. reject put messages with incorrect bencoding
2017-07-02 18:30:32 -04:00
arvidn
5c37eb174f
drop support for windows compilers without std::string and wchar_t (believed to be old cygwin)
2017-07-02 08:24:55 -04:00
arvidn
db09332a02
merged RC_1_1 into master
2017-06-30 08:58:21 -04:00
arvidn
3c8450d47c
fix backwards compatibility issue when loading the torrent info dict from resume data
2017-06-29 15:03:49 -04:00
arvidn
506950001d
fix regression where paused torrents could not have their queue position changed
2017-06-27 12:37:08 -04:00
arvidn
2b91b1070d
merged RC_1_1 into master
2017-06-24 12:37:13 -04:00
Steven Siloti
ec30a5e9ec
fix out-of-bounds read in bdecode
...
Fixes #2099
2017-06-24 10:52:49 -04:00
arvidn
b7642f75d5
move clear_bufs out of storage.cpp into storage_utils
2017-06-21 13:04:05 -04:00
arvidn
aa842948a3
storage_params cleanup
2017-06-20 10:27:28 -04:00
arvidn
ff454a92d4
unify some operation-enums and strings to use operation_t
2017-06-18 07:31:45 -04:00
arvidn
b80c477733
merged RC_1_1 into master
2017-06-16 00:24:41 -04:00
arvidn
a97121d6f2
move_storage did not work for torrents without metadata
2017-06-15 21:20:22 -04:00
Alden Torres
48ef3b6bf7
implemented support for BEP 51 ( #1652 )
2017-06-12 11:54:11 +02:00
arvidn
147d996160
make the job action enum an enum class
2017-06-11 23:53:58 +02:00
arvidn
f3d319b677
fix internal use of deprecated function identify_client
2017-06-10 08:16:23 +02:00
Andrei Kurushin
fc0cbfb789
fix bandwith rate limit calculation ( #2060 )
2017-06-08 12:50:55 +02:00
arvidn
4de9f6a75b
remove requester parameter to disk read jobs
2017-06-08 12:38:25 +02:00
arvidn
6967d17a42
make move constructors and move assignment operators noexcept
2017-06-01 23:42:15 +02:00
Arvid Norberg
5344761da4
make flags to move_storage a proper enum class ( #2043 )
2017-06-01 04:15:15 -04:00
arvidn
afce0d3a86
make resolver_flags use enum class for improved type-safety
2017-05-29 18:38:59 -04:00
arvidn
ffaabd846c
make file open mode flags be an enum class for type-safety
2017-05-28 11:16:59 -04:00
Arvid Norberg
660cdaf2d1
deprecate direct access to array in session_stats_alert ( #2033 )
2017-05-27 20:33:31 -04:00
Arvid Norberg
1925d1e7aa
add test for recent duplicate add bug ( #2003 )
2017-05-17 23:04:50 -04:00
arvidn
73a3e390b5
merge RC_1_1 into master
2017-05-15 09:12:23 -04:00