minor cleanup and fixes
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
function run
|
||||
{
|
||||
# run for 48 hours
|
||||
./fuzzers/${1} -max_total_time=172800 -timeout=10 -artifact_prefix=./${1}- corpus/${1}
|
||||
nice ./fuzzers/${1} -max_total_time=172800 -timeout=10 -artifact_prefix=./${1}- corpus/${1}
|
||||
}
|
||||
|
||||
for file in fuzzers/*; do
|
||||
|
@ -43,19 +43,20 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "libtorrent/aux_/array.hpp"
|
||||
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <utility> // for std::forward
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
#include <atomic>
|
||||
#include <bitset>
|
||||
|
||||
namespace libtorrent {
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
struct plugin;
|
||||
#include "libtorrent/extensions.hpp"
|
||||
#include <memory> // for shared_ptr
|
||||
#include <list>
|
||||
#endif
|
||||
|
||||
namespace libtorrent {
|
||||
|
||||
class TORRENT_EXTRA_EXPORT alert_manager
|
||||
{
|
||||
public:
|
||||
|
@ -39,6 +39,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
#include "libtorrent/extensions.hpp"
|
||||
#include <memory> // for shared_ptr
|
||||
#endif
|
||||
|
||||
namespace libtorrent {
|
||||
|
@ -286,7 +286,7 @@ namespace {
|
||||
if (flags & session_handle::save_dht_settings)
|
||||
{
|
||||
settings = e.dict_find_dict("dht");
|
||||
if (settings && settings.type() == bdecode_node::dict_t)
|
||||
if (settings)
|
||||
{
|
||||
params.dht_settings = dht::read_dht_settings(settings);
|
||||
aux::apply_deprecated_dht_settings(params.settings, settings);
|
||||
|
@ -688,11 +688,6 @@ void apply_deprecated_dht_settings(settings_pack& sett, bdecode_node const& s)
|
||||
#endif
|
||||
}
|
||||
|
||||
proxy_settings session_impl::proxy() const
|
||||
{
|
||||
return proxy_settings(m_settings);
|
||||
}
|
||||
|
||||
void session_impl::load_state(bdecode_node const* e
|
||||
, save_state_flags_t const flags)
|
||||
{
|
||||
@ -796,7 +791,7 @@ void apply_deprecated_dht_settings(settings_pack& sett, bdecode_node const& s)
|
||||
// files in the previous file format, where the DHT settings were in
|
||||
// its own dictionary
|
||||
settings = e->dict_find_dict("dht");
|
||||
if (settings && settings.type() == bdecode_node::dict_t)
|
||||
if (settings)
|
||||
{
|
||||
settings_pack sett;
|
||||
aux::apply_deprecated_dht_settings(sett, settings);
|
||||
@ -819,6 +814,11 @@ void apply_deprecated_dht_settings(settings_pack& sett, bdecode_node const& s)
|
||||
#endif
|
||||
}
|
||||
|
||||
proxy_settings session_impl::proxy() const
|
||||
{
|
||||
return proxy_settings(m_settings);
|
||||
}
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
void session_impl::add_extension(ext_function_t ext)
|
||||
|
@ -358,12 +358,12 @@ namespace libtorrent { namespace {
|
||||
}
|
||||
}
|
||||
|
||||
bdecode_node p6 = pex_msg.dict_find("dropped6");
|
||||
#ifndef TORRENT_DISABLE_LOGGING
|
||||
if (p6) num_dropped += p6.string_length() / 18;
|
||||
#endif
|
||||
if (p6.type() == bdecode_node::string_t)
|
||||
bdecode_node p6 = pex_msg.dict_find_string("dropped6");
|
||||
if (p6)
|
||||
{
|
||||
#ifndef TORRENT_DISABLE_LOGGING
|
||||
num_dropped += p6.string_length() / 18;
|
||||
#endif
|
||||
int const num_peers = p6.string_length() / 18;
|
||||
char const* in = p6.string_ptr();
|
||||
|
||||
@ -376,14 +376,12 @@ namespace libtorrent { namespace {
|
||||
}
|
||||
}
|
||||
|
||||
p6 = pex_msg.dict_find("added6");
|
||||
p6 = pex_msg.dict_find_string("added6");
|
||||
#ifndef TORRENT_DISABLE_LOGGING
|
||||
if (p6) num_added += p6.string_length() / 18;
|
||||
#endif
|
||||
bdecode_node const p6f = pex_msg.dict_find("added6.f");
|
||||
if (p6.type() == bdecode_node::string_t
|
||||
&& p6f.type() == bdecode_node::string_t
|
||||
&& p6f.string_length() == p6.string_length() / 18)
|
||||
bdecode_node const p6f = pex_msg.dict_find_string("added6.f");
|
||||
if (p6 && p6f && p6f.string_length() == p6.string_length() / 18)
|
||||
{
|
||||
int const num_peers = p6f.string_length();
|
||||
char const* in = p6.string_ptr();
|
||||
|
Reference in New Issue
Block a user