Skip to content

Commit

Permalink
* r504 release sp build-21352
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-pimenov committed Feb 18, 2018
1 parent 3ab03ea commit 6452934
Show file tree
Hide file tree
Showing 47 changed files with 2,201 additions and 276 deletions.
7 changes: 0 additions & 7 deletions Tools/GeneratePortalBrowserXMLdoc.bat

This file was deleted.

1 change: 0 additions & 1 deletion Tools/UpdateGitRevision.bat
@@ -1,4 +1,3 @@
@echo off

set NOCOMMIT=
set VERSION_NUM=503
Expand Down
1 change: 0 additions & 1 deletion Tools/generate-version.bat
@@ -1,4 +1,3 @@
@echo off
set file=%1ver.inc
set tmpfile=%1ver.inc.tmp

Expand Down
23 changes: 13 additions & 10 deletions client/CryptoManager.cpp
Expand Up @@ -361,10 +361,10 @@ int CryptoManager::getKeyLength(TLSTmpKeys key)
DH* CryptoManager::getTmpDH(int keyLen)
{
if (keyLen < 2048)
return NULL;
return nullptr;

DH* tmpDH = DH_new();
if (!tmpDH) return NULL;
if (!tmpDH) return nullptr;

// From RFC 3526; checked via http://wiki.openssl.org/index.php/Diffie-Hellman_parameters#Validating_Parameters
switch (keyLen)
Expand Down Expand Up @@ -396,7 +396,7 @@ DH* CryptoManager::getTmpDH(int keyLen)
0x15, 0x72, 0x8E, 0x5A, 0x8A, 0xAC, 0xAA, 0x68, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF,
};
tmpDH->p = BN_bin2bn(dh2048_p, sizeof(dh2048_p), 0);
tmpDH->p = BN_bin2bn(dh2048_p, sizeof(dh2048_p), nullptr);
break;
}

Expand Down Expand Up @@ -448,7 +448,7 @@ DH* CryptoManager::getTmpDH(int keyLen)
0x90, 0xA6, 0xC0, 0x8F, 0x4D, 0xF4, 0x35, 0xC9, 0x34, 0x06, 0x31, 0x99,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
};
tmpDH->p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), 0);
tmpDH->p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), nullptr);
break;
}
}
Expand All @@ -458,29 +458,32 @@ DH* CryptoManager::getTmpDH(int keyLen)
0x02,
};

tmpDH->g = BN_bin2bn(dh_g, sizeof(dh_g), 0);
tmpDH->g = BN_bin2bn(dh_g, sizeof(dh_g), nullptr);

if (!tmpDH->p || !tmpDH->g)
{
DH_free(tmpDH);
return NULL;
return nullptr;
}
else
{
return tmpDH;
}
else return tmpDH;
}

RSA* CryptoManager::getTmpRSA(int keyLen)
{
if (keyLen < 2048)
return NULL;
return nullptr;

RSA* tmpRSA = RSA_new();
BIGNUM* bn = BN_new();

if (!bn || !BN_set_word(bn, RSA_F4) || !RSA_generate_key_ex(tmpRSA, keyLen, bn, NULL))
if (!bn || !BN_set_word(bn, RSA_F4) || !RSA_generate_key_ex(tmpRSA, keyLen, bn, nullptr))
{
if (bn) BN_free(bn);
RSA_free(tmpRSA);
return NULL;
return nullptr;
}

BN_free(bn);
Expand Down
4 changes: 2 additions & 2 deletions client/SearchResult.h
Expand Up @@ -228,12 +228,12 @@ class SearchResult : public SearchResultCore

string m_hubName;
string m_hubURL;
boost::asio::ip::address_v4 m_search_ip4;
string m_p2p_guard_text;
bool m_is_p2p_guard_calc;
boost::asio::ip::address_v4 m_search_ip4;
uint32_t m_token;
UserPtr m_user;
bool m_is_tth_check;
bool m_is_p2p_guard_calc;
};

#endif
9 changes: 8 additions & 1 deletion compiled/readme_changelog_lite.rtf
Expand Up @@ -7,7 +7,14 @@
\'d2\'e0\'ea\'e6\'e5 \'e0\'ed\'ee\'ed\'e8\'ec\'ed\'ee \'ec\'ee\'e6\'ed\'ee \'e2\'fb\'f1\'ea\'e0\'e7\'fb\'e2\'e0\'f2\'fc \'e7\'e0\'ec\'e5\'f7\'e0\'ed\'e8\'ff \'ee \'ef\'f0\'ee\'e3\'f0\'e0\'ec\'ec\'e5 \'ed\'e0 \'f5\'e0\'e1\'e5 \'ef\'ee\'e4\'e4\'e5\'e6\'ea\'e8\par
dchub://dc.fly-server.ru\par
\par
\lang1033\b\f1\fs20 ===\lang1049\f0 \lang1033\f1 r50\lang1049\f0 4 \lang1033\f1 build 21332 ===\par
\lang1033\b\f1\fs20 ===\lang1049\f0 \lang1033\f1 r50\lang1049\f0 4 \lang1033\f1 build 21352 ===\par
\pard\nowidctlpar\lang1049\b0\f0\fs16 * \'c8\'f1\'ef\'f0\'e0\'e2\'eb\'e5\'ed\'ee \'ef\'e0\'e4\'e5\'ed\'e8\'e5 {\field{\*\fldinst{HYPERLINK "https://github.com/MediaArea/MediaInfoLib/issues/783"}}{\fldrslt{\ul\cf4 https://github.com/MediaArea/MediaInfoLib/issues/783}}}\f0\fs16\par
\pard\lang1033\b\f1\fs20 ===\lang1049\f0 \lang1033\f1 r50\lang1049\f0 4 \lang1033\f1 build 213\lang1049\f0 4\lang1033\f1 6 ===\par
\pard\nowidctlpar\lang1049\b0\f0\fs16 * jsoncpp \par
* libtorrent\par
\pard\lang1033\b\f1\fs20 ===\lang1049\f0 \lang1033\f1 r50\lang1049\f0 4 \lang1033\f1 build 213\lang1049\f0 41\lang1033\f1 ===\par
\pard\nowidctlpar\lang1049\b0\f0\fs16 * \'c8\'f1\'ef\'f0\'e0\'e2\'eb\'e5\'ed\'ee \'ef\'e0\'e4\'e5\'ed\'e8\'e5 {\field{\*\fldinst{HYPERLINK "https://drdump.com/Problem.aspx?ProblemID=364805"}}{\fldrslt{\ul\cf4 https://drdump.com/Problem.aspx?ProblemID=364805}}}\f0\fs16 \par
\pard\lang1033\b\f1\fs20 ===\lang1049\f0 \lang1033\f1 r50\lang1049\f0 4 \lang1033\f1 build 21332 ===\par
\pard\nowidctlpar\lang1049\b0\f0\fs16 * \'c8\'f1\'ef\'f0\'e0\'e2\'eb\'e5\'ed\'ee \'ef\'ee\'e4\'ec\'e5\'f0\'e7\'e0\'ed\'e8\'e5 \'ee\'ea\'ee\'ed \'ef\'ee\'e8\'f1\'ea\'e0 \'ef\'f0\'e8 \'ee\'e1\'ed\'ee\'e2\'eb\'e5\'ed\'e8\'e8 \'f8\'e0\'f0\'fb (\'f1\'ef\'e0\'f1\'e8\'e1\'ee Woldemar)\par
\pard\lang1033\b\f1\fs20 ===\lang1049\f0 \lang1033\f1 r50\lang1049\f0 4 \lang1033\f1 build 21328 ===\par
\pard\nowidctlpar\lang1049\b0\f0\fs16 * \'c8\'f1\'ef\'f0\'e0\'e2\'eb\'e5\'ed\'ee \'ea\'ee\'ef\'e8\'f0\'ee\'e2\'e0\'ed\'e8\'e5 torrent \'f1\'f1\'fb\'eb\'ea\'e8 \'e8\'e7 \'ee\'ea\'ed\'e0 \'ef\'e5\'f0\'e5\'e4\'e0\'f7\'e8. (balarama)\par
Expand Down
4 changes: 2 additions & 2 deletions jsoncpp/include/json/json.h
Expand Up @@ -198,7 +198,7 @@ license you like.

// In c++11 the override keyword allows you to explicitly define that a function
// is intended to override the base-class version. This makes the code more
// managable and fixes a set of common hard-to-find bugs.
// manageable and fixes a set of common hard-to-find bugs.
#if __cplusplus >= 201103L
# define JSONCPP_OVERRIDE override
# define JSONCPP_NOEXCEPT noexcept
Expand Down Expand Up @@ -1944,7 +1944,7 @@ class JSONCPP_DEPRECATED("Use StreamWriter instead") JSON_API Writer {
*
* The JSON document is written in a single line. It is not intended for 'human'
*consumption,
* but may be usefull to support feature such as RPC where bandwith is limited.
* but may be useful to support feature such as RPC where bandwidth is limited.
* \sa Reader, Value
* \deprecated Use StreamWriterBuilder.
*/
Expand Down
9 changes: 7 additions & 2 deletions jsoncpp/jsoncpp.cpp
Expand Up @@ -3653,7 +3653,12 @@ bool Value::removeMember(const char* key, const char* cend, Value* removed)
ObjectValues::iterator it = value_.map_->find(actualKey);
if (it == value_.map_->end())
return false;
*removed = it->second;
if (removed)
#if JSON_HAS_RVALUE_REFERENCES
*removed = std::move(it->second);
#else
*removed = it->second;
#endif
value_.map_->erase(it);
return true;
}
Expand Down Expand Up @@ -4365,7 +4370,7 @@ static unsigned int utf8ToCodepoint(const char*& s, const char* e) {
if (e - s < 4)
return REPLACEMENT_CHARACTER;

unsigned int calculated = ((firstByte & 0x07) << 24)
unsigned int calculated = ((firstByte & 0x07) << 18)
| ((static_cast<unsigned int>(s[1]) & 0x3F) << 12)
| ((static_cast<unsigned int>(s[2]) & 0x3F) << 6)
| (static_cast<unsigned int>(s[3]) & 0x3F);
Expand Down
4 changes: 4 additions & 0 deletions libtorrent/ChangeLog
Expand Up @@ -82,6 +82,10 @@
* resume data no longer has timestamps of files
* require C++11 to build libtorrent

* defer truncating existing files until the first time we write to them
* fix issue when receiving a torrent with 0-sized padfiles as magnet link
* fix issue resuming 1.0.x downloads with a file priority 0
* fix torrent_status::next_announce
* fix pad-file scalability issue
* made coalesce_reads/coalesce_writes settings take effect on linux and windows
* restore support for incoming connections over SOCKS5 (disabled by default)
Expand Down
12 changes: 4 additions & 8 deletions libtorrent/include/libtorrent/aux_/session_impl.hpp
Expand Up @@ -209,9 +209,9 @@ namespace aux {

struct TORRENT_EXTRA_EXPORT listen_endpoint_t
{
listen_endpoint_t(address adr, int p, std::string dev, transport s
listen_endpoint_t(address const& adr, int p, std::string dev, transport s
, duplex d = duplex::accept_incoming)
: addr(adr), port(p), device(dev), ssl(s), incoming(d) {}
: addr(adr), port(p), device(std::move(dev)), ssl(s), incoming(d) {}

bool operator==(listen_endpoint_t const& o) const
{
Expand Down Expand Up @@ -289,7 +289,7 @@ namespace aux {

struct session_plugin_wrapper : plugin
{
explicit session_plugin_wrapper(ext_function_t const& f) : m_f(f) {}
explicit session_plugin_wrapper(ext_function_t f) : m_f(std::move(f)) {}

std::shared_ptr<torrent_plugin> new_torrent(torrent_handle const& t, void* user) override
{ return m_f(t, user); }
Expand Down Expand Up @@ -592,7 +592,6 @@ namespace aux {

void get_cache_info(torrent_handle h, cache_status* ret, int flags) const;

void set_key(std::uint32_t key);
std::uint16_t listen_port() const override;
std::uint16_t listen_port(listen_socket_t* sock) const;
std::uint16_t ssl_listen_port() const override;
Expand Down Expand Up @@ -659,9 +658,6 @@ namespace aux {

void deferred_submit_jobs() override;

torrent_peer* allocate_peer_entry(int type);
void free_peer_entry(torrent_peer* p);

// implements dht_observer
void set_external_address(aux::listen_socket_handle const& iface
, address const& ip, address const& source) override;
Expand Down Expand Up @@ -788,7 +784,7 @@ namespace aux {
void on_lsd_peer(tcp::endpoint const& peer, sha1_hash const& ih) override;

void set_external_address(std::shared_ptr<listen_socket_t> const& sock, address const& ip
, ip_source_t const source_type, address const& source);
, ip_source_t source_type, address const& source);

void interface_to_endpoints(std::string const& device, int port
, transport ssl, duplex incoming, std::vector<listen_endpoint_t>& eps);
Expand Down
2 changes: 1 addition & 1 deletion libtorrent/include/libtorrent/block_cache.hpp
Expand Up @@ -188,7 +188,7 @@ namespace aux {
return refcount == 0
&& piece_refcount == 0
&& !hashing
&& read_jobs.size() == 0
&& read_jobs.empty()
&& outstanding_read == 0
&& (ignore_hash || !hash || hash->offset == 0);
}
Expand Down
7 changes: 4 additions & 3 deletions libtorrent/include/libtorrent/config.hpp
Expand Up @@ -35,13 +35,13 @@ POSSIBILITY OF SUCH DAMAGE.

// [+]FlylinkDC++
#ifndef TORRENT_NO_BLOCK_ALERTS
#define TORRENT_NO_BLOCK_ALERTS
//#define TORRENT_NO_BLOCK_ALERTS
#endif
#ifndef TORRENT_NO_PIECE_ALERTS
#define TORRENT_NO_PIECE_ALERTS
//#define TORRENT_NO_PIECE_ALERTS
#endif
#ifndef TORRENT_NO_STATE_CHANGES_ALERTS
#define TORRENT_NO_STATE_CHANGES_ALERTS
//#define TORRENT_NO_STATE_CHANGES_ALERTS
#endif
#ifndef TORRENT_NO_DEPRECATE
#define TORRENT_NO_DEPRECATE
Expand Down Expand Up @@ -331,6 +331,7 @@ POSSIBILITY OF SUCH DAMAGE.
#ifndef TORRENT_USE_ICONV
#define TORRENT_USE_ICONV 0
#endif
#define TORRENT_USE_MEMALIGN 1

// ==== GNU/Hurd ===
#elif defined __GNU__
Expand Down
2 changes: 1 addition & 1 deletion libtorrent/include/libtorrent/disk_interface.hpp
Expand Up @@ -105,7 +105,7 @@ namespace libtorrent {
}

// this contains information about a file that's currently open by the
// libtorrent disk I/O subsystem. It's associated with a single torent.
// libtorrent disk I/O subsystem. It's associated with a single torrent.
struct TORRENT_EXPORT open_file_state
{
// the index of the file this entry refers to into the ``file_storage``
Expand Down
4 changes: 2 additions & 2 deletions libtorrent/include/libtorrent/disk_io_job.hpp
Expand Up @@ -137,10 +137,10 @@ namespace libtorrent {
using read_handler = std::function<void(disk_buffer_holder block, disk_job_flags_t flags, storage_error const& se)>;
using write_handler = std::function<void(storage_error const&)>;
using hash_handler = std::function<void(piece_index_t, sha1_hash const&, storage_error const&)>;
using move_handler = std::function<void(status_t, std::string const&, storage_error const&)>;
using move_handler = std::function<void(status_t, std::string, storage_error const&)>;
using release_handler = std::function<void()>;
using check_handler = std::function<void(status_t, storage_error const&)>;
using rename_handler = std::function<void(std::string const&, file_index_t, storage_error const&)>;
using rename_handler = std::function<void(std::string, file_index_t, storage_error const&)>;
using clear_piece_handler = std::function<void(piece_index_t)>;

boost::variant<read_handler
Expand Down
1 change: 0 additions & 1 deletion libtorrent/include/libtorrent/disk_io_thread.hpp
Expand Up @@ -376,7 +376,6 @@ namespace aux {
status_t do_check_fastresume(disk_io_job* j, jobqueue_t& completed_jobs);
status_t do_rename_file(disk_io_job* j, jobqueue_t& completed_jobs);
status_t do_stop_torrent(disk_io_job* j, jobqueue_t& completed_jobs);
status_t do_read_and_hash(disk_io_job* j, jobqueue_t& completed_jobs);
status_t do_flush_piece(disk_io_job* j, jobqueue_t& completed_jobs);
status_t do_flush_hashed(disk_io_job* j, jobqueue_t& completed_jobs);
status_t do_flush_storage(disk_io_job* j, jobqueue_t& completed_jobs);
Expand Down
2 changes: 1 addition & 1 deletion libtorrent/include/libtorrent/disk_io_thread_pool.hpp
Expand Up @@ -69,7 +69,7 @@ namespace libtorrent {

// set the maximum number of I/O threads which may be running
// the actual number of threads will be <= this number
void set_max_threads(int const i);
void set_max_threads(int i);
void abort(bool wait);
int max_threads() const { return m_max_threads; }

Expand Down
1 change: 0 additions & 1 deletion libtorrent/include/libtorrent/disk_job_pool.hpp
Expand Up @@ -73,4 +73,3 @@ namespace libtorrent {
}

#endif // TORRENT_DISK_JOB_POOL

1 change: 0 additions & 1 deletion libtorrent/include/libtorrent/flags.hpp
Expand Up @@ -136,4 +136,3 @@ struct bitfield_flag
} // libtorrent

#endif

4 changes: 2 additions & 2 deletions libtorrent/include/libtorrent/kademlia/direct_request.hpp
Expand Up @@ -40,13 +40,13 @@ namespace libtorrent { namespace dht {

struct direct_traversal : traversal_algorithm
{
typedef std::function<void(dht::msg const&)> message_callback;
using message_callback = std::function<void(dht::msg const&)>;

direct_traversal(node& node
, node_id const& target
, message_callback cb)
: traversal_algorithm(node, target)
, m_cb(cb)
, m_cb(std::move(cb))
{}

char const* name() const override { return "direct_traversal"; }
Expand Down
4 changes: 2 additions & 2 deletions libtorrent/include/libtorrent/kademlia/put_data.hpp
Expand Up @@ -72,9 +72,9 @@ struct put_data_observer : traversal_observer
{
put_data_observer(
std::shared_ptr<traversal_algorithm> algorithm
, udp::endpoint const& ep, node_id const& id, std::string const& token)
, udp::endpoint const& ep, node_id const& id, std::string token)
: traversal_observer(std::move(algorithm), ep, id)
, m_token(token)
, m_token(std::move(token))
{
}

Expand Down
10 changes: 0 additions & 10 deletions libtorrent/include/libtorrent/kademlia/routing_table.hpp
Expand Up @@ -130,16 +130,6 @@ struct ip_set
// bucket has failed, then it is put in the replacement
// cache (just like in the paper).

namespace impl
{
template <typename F>
inline void forwarder(void* userdata, node_entry const& node)
{
F* f = reinterpret_cast<F*>(userdata);
(*f)(node);
}
}

TORRENT_EXTRA_EXPORT bool compare_ip_cidr(address const& lhs, address const& rhs);

class TORRENT_EXTRA_EXPORT routing_table
Expand Down
3 changes: 2 additions & 1 deletion libtorrent/include/libtorrent/packet_pool.hpp
Expand Up @@ -130,6 +130,7 @@ namespace libtorrent {
}

packet_slab(const packet_slab&) = delete;
packet_slab(packet_slab&&) = default;

void try_push_back(packet_ptr &p)
{
Expand Down Expand Up @@ -183,7 +184,7 @@ namespace libtorrent {
{
TORRENT_ASSERT(is_single_thread());

if (p.get() == nullptr) return;
if (!p) return;

int const allocated = p->allocated;

Expand Down

0 comments on commit 6452934

Please sign in to comment.