Skip to content

Commit

Permalink
* r503 release sp build-19978
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-pimenov committed Oct 3, 2016
1 parent 7ca6832 commit 9c0919f
Show file tree
Hide file tree
Showing 102 changed files with 627 additions and 7,364 deletions.
2 changes: 1 addition & 1 deletion FlyFeatures/flyServer.cpp
Expand Up @@ -1481,7 +1481,7 @@ void CFlyServerJSON::pushSyslogError(const string& p_error)
}
#endif
//======================================================================================================
bool CFlyServerJSON::pushError(unsigned p_error_code, string p_error, bool p_is_include_disk_info /* = false*/) // Last Code = 71 (36,58,44 - óñòàðåëè)
bool CFlyServerJSON::pushError(unsigned p_error_code, string p_error, bool p_is_include_disk_info /* = false*/) // Last Code = 72 (36,58,44 - óñòàðåëè)
{
bool l_is_send = false;
bool l_is_error = false;
Expand Down
39 changes: 18 additions & 21 deletions FlylinkDC.rc
Expand Up @@ -484,16 +484,16 @@ FONT 8, "Tahoma", 400, 0, 0xEE
BEGIN
END

IDD_NETWORK_PAGE DIALOGEX 0, 0, 325, 300
IDD_NETWORK_PAGE DIALOGEX 0, 0, 326, 278
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
EXSTYLE WS_EX_STATICEDGE
CAPTION "Dialog"
FONT 8, "MS Shell Dlg", 400, 0, 0xEE
BEGIN
GROUPBOX "Bind Address",IDC_SETTINGS_BIND_ADDRESS,4,2,316,27
GROUPBOX "Bind Address",IDC_SETTINGS_BIND_ADDRESS,4,2,317,27
RTEXT "Network interface for all connections",IDC_SETTINGS_BIND_ADDRESS_HELP,7,13,195,8
COMBOBOX IDC_BIND_ADDRESS,206,11,108,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Incoming Connection Settings (See help / FAQ if unsure)",IDC_SETTINGS_INCOMING,4,30,316,179,WS_GROUP
GROUPBOX "Incoming Connection Settings (See help / FAQ if unsure)",IDC_SETTINGS_INCOMING,4,30,317,179,WS_GROUP
CONTROL "Enable automatic incoming connection type detection",IDC_CONNECTION_DETECTION,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,39,253,10
CONTROL "Direct connection",IDC_DIRECT,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,8,52,87,9
Expand All @@ -513,7 +513,7 @@ BEGIN
EDITTEXT IDC_PORT_UDP,240,113,30,14,ES_AUTOHSCROLL | ES_NUMBER
LTEXT "TLS/TCP",IDC_SETTINGS_PORT_TLS,207,131,28,8,0,WS_EX_RIGHT
EDITTEXT IDC_PORT_TLS,240,129,30,14,ES_AUTOHSCROLL | ES_NUMBER
LTEXT "Torrent",IDC_SETTINGS_PORT_DHT,205,146,30,8,0,WS_EX_RIGHT
LTEXT "Torrent",IDC_SETTINGS_PORT_TORRENT,205,146,30,8,0,WS_EX_RIGHT
EDITTEXT IDC_PORT_DHT,240,145,30,14,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "Don't allow hub/UPnP to override",IDC_NO_IP_OVERRIDE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,167,157,10
Expand All @@ -524,26 +524,23 @@ BEGIN
CONTROL "Update IP on startup",IDC_IPUPDATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,211,194,10
LTEXT "Update IP interval\r\n...",IDC_SETTINGS_UPDATE_IP_INTERVAL,9,223,231,16
EDITTEXT IDC_UPDATE_IP_INTERVAL,264,224,44,14,ES_AUTOHSCROLL | ES_NUMBER
GROUPBOX "DHT",IDC_SETTINGS_DHT,4,242,316,51
CONTROL "Enable DHT. Publish shared files on DHT and use it for searching alternate sources",IDC_SETTINGS_USE_DHT,
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,11,250,306,16
CONTROL "Do not ask again",IDC_SETTINGS_USE_DHT_NOTANSWER,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,20,267,142,8
CONTROL "Update IP on DHT firewall check",IDC_UPDATE_IP_DHT,
"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,11,281,306,8
ICON "",IDC_NETWORK_TEST_PORT_TCP_ICO,274,99,20,20
ICON "",IDC_NETWORK_TEST_PORT_UDP_ICO,274,114,20,20
ICON "",IDC_NETWORK_TEST_PORT_TLS_TCP_ICO,274,130,20,20
ICON "",IDC_NETWORK_TEST_PORT_DHT_UDP_ICO,274,145,20,20
GROUPBOX "Torrent",IDC_SETTINGS_TORRENT,4,242,317,27
CONTROL "Enable torrent DHT",IDC_SETTINGS_USE_TORRENT,
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,11,249,303,17
ICON "",IDC_NETWORK_TEST_PORT_TCP_ICO,274,99,21,20
ICON "",IDC_NETWORK_TEST_PORT_UDP_ICO,274,114,21,20
ICON "",IDC_NETWORK_TEST_PORT_TLS_TCP_ICO,274,130,21,20
ICON "",IDC_NETWORK_TEST_PORT_DHT_UDP_ICO,274,145,21,20
ICON "",IDC_NETWORK_WINFIREWALL_ICO,173,144,21,20
PUSHBUTTON "Windows Firewall: FlylinkDC++ exception",IDC_ADD_FLYLINKDC_WINFIREWALL,10,147,160,14
EDITTEXT IDC_DEFAULT_GATEWAY_IP,121,99,70,14,ES_AUTOHSCROLL | ES_READONLY | WS_DISABLED
LTEXT "Gateway:",IDC_STATIC_GATEWAY,87,100,30,11,WS_DISABLED
ICON "",IDC_WIFI_ROUTER_ICO,283,36,20,20
ICON "",IDC_WIFI_ROUTER_ICO,283,36,21,20
EDITTEXT IDC_UPNP_EXTERNAL_IP,204,49,77,14,ES_AUTOHSCROLL | ES_READONLY | WS_DISABLED
ICON "",IDC_NETWORK_TEST_PORT_TCP_ICO_UPNP,298,99,20,20
ICON "",IDC_NETWORK_TEST_PORT_UDP_ICO_UPNP,298,114,20,20
ICON "",IDC_NETWORK_TEST_PORT_TLS_TCP_ICO_UPNP,298,130,20,20
ICON "",IDC_NETWORK_TEST_PORT_DHT_UDP_ICO_UPNP,298,145,20,20
ICON "",IDC_NETWORK_TEST_PORT_TCP_ICO_UPNP,298,99,21,20
ICON "",IDC_NETWORK_TEST_PORT_UDP_ICO_UPNP,298,114,21,20
ICON "",IDC_NETWORK_TEST_PORT_TLS_TCP_ICO_UPNP,298,130,21,20
ICON "",IDC_NETWORK_TEST_PORT_DHT_UDP_ICO_UPNP,298,145,21,20
GROUPBOX "UPnP",IDC_SETTINGS_PORTS_UPNP,293,90,22,72,BS_CENTER
CONTROL "Manual WAN IP",IDC_WAN_IP_MANUAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,117,177,10
END
Expand Down Expand Up @@ -2132,15 +2129,15 @@ BEGIN
IDD_NETWORK_PAGE, DIALOG
BEGIN
LEFTMARGIN, 4
RIGHTMARGIN, 320
RIGHTMARGIN, 321
VERTGUIDE, 162
VERTGUIDE, 202
VERTGUIDE, 259
VERTGUIDE, 264
VERTGUIDE, 308
VERTGUIDE, 314
TOPMARGIN, 3
BOTTOMMARGIN, 293
BOTTOMMARGIN, 271
END

IDD_CERTIFICATES_PAGE, DIALOG
Expand Down
1 change: 0 additions & 1 deletion client/CFlylinkDBManager.h
Expand Up @@ -13,7 +13,6 @@
#include "Singleton.h"
#include "CFlyThread.h"
#include "sqlite/sqlite3x.hpp"
#include "../dht/DHTType.h"
#include "CFlyMediaInfo.h"
#include "LogManager.h"

Expand Down
3 changes: 0 additions & 3 deletions client/ClientManager.cpp
Expand Up @@ -29,9 +29,6 @@
#include "../FlyFeatures/flyServer.h"
#include "../FlyFeatures/AutoUpdate.h"

#ifdef STRONG_USE_DHT
#include "../dht/dht.h"
#endif
#ifndef _DEBUG
#include "DbgHelp.h"
#include "../doctor-dump/CrashRpt.h"
Expand Down
1 change: 0 additions & 1 deletion client/ConnectionManager.h
Expand Up @@ -200,7 +200,6 @@ class ConnectionManager :
{
public:
TokenManager m_tokens_manager;
//TokenManager m_sha1_manager;
void nmdcExpect(const string& aNick, const string& aMyNick, const string& aHubUrl
#ifdef RIP_USE_CONNECTION_AUTODETECT
, ExpectedMap::DefinedExpectedReason reason = ExpectedMap::REASON_DEFAULT
Expand Down
4 changes: 0 additions & 4 deletions client/ConnectivityManager.cpp
Expand Up @@ -26,10 +26,6 @@
#include "SettingsManager.h"
#include "../FlyFeatures/flyServer.h"

#ifdef STRONG_USE_DHT
#include "../dht/dht.h"
#endif

ConnectivityManager::ConnectivityManager() :
autoDetected(false),
running(false)
Expand Down
3 changes: 3 additions & 0 deletions client/DCPlusPlus.cpp
Expand Up @@ -294,6 +294,9 @@ void shutdown(GUIINITPROC pGuiInitProc, void *pGuiParam)
#ifdef _DEBUG
dcdebug("shutdown (after closing last hub (DHT::stop) - User::g_user_counts = %d OnlineUser::g_online_user_counts = %d\n", int(User::g_user_counts), int(OnlineUser::g_online_user_counts)); // [+] IRainman fix.
#endif
#endif
#ifdef FLYLINKDC_USE_TORRENT
DownloadManager::getInstance()->shutdown_torrent();
#endif
QueueManager::getInstance()->saveQueue(true);
SettingsManager::getInstance()->save();
Expand Down
186 changes: 105 additions & 81 deletions client/DownloadManager.cpp
Expand Up @@ -54,6 +54,10 @@ DownloadManager::DownloadManager()
#endif

}
void DownloadManager::shutdown_torrent()
{
m_torrent_session.reset();
}

DownloadManager::~DownloadManager()
{
Expand Down Expand Up @@ -953,22 +957,29 @@ void DownloadManager::onTimeTorrent(uint64_t aTick)
for (lt::alert const * a : alerts)
{
//LogManager::torrent_message(".:::. TorrentAllert:" + a->message() + " info:" + std::string(a->what()));
if (const auto l_port = lt::alert_cast<lt::portmap_alert>(a))
{
LogManager::message("portmap_alert: " + a->message() + " info:" + std::string(a->what()));
SettingsManager::g_upnpTorrentLevel = true;
}
if (const auto l_port = lt::alert_cast<lt::portmap_error_alert>(a))
{
LogManager::message("portmap_error_alert: " + a->message() + " info:" + std::string(a->what()));
SettingsManager::g_upnpTorrentLevel = false;
}
if (const auto l_delete = lt::alert_cast<lt::torrent_removed_alert>(a))
{
LogManager::torrent_message("torrent_removed_alert: " + a->message());
// ConnectionManager::getInstance()->m_sha1_manager.removeToken(l_delete->info_hash.to_string());
fly_fire1(DownloadManagerListener::RemoveToken(), l_delete->info_hash.to_string());

}
if (const auto l_delete = lt::alert_cast<lt::torrent_delete_failed_alert>(a))
{
LogManager::torrent_message("torrent_deleted_alert: " + a->message());
// ConnectionManager::getInstance()->m_sha1_manager.removeToken(l_delete->info_hash.to_string());
}
if (const auto l_delete = lt::alert_cast<lt::torrent_deleted_alert>(a))
{
LogManager::torrent_message("torrent_deleted_alert: " + a->message());
// ConnectionManager::getInstance()->m_sha1_manager.removeToken(l_delete->info_hash.to_string());
fly_fire1(DownloadManagerListener::RemoveToken(), l_delete->info_hash.to_string());

}
Expand Down Expand Up @@ -1049,16 +1060,24 @@ for (const auto j : st->status)
}
}
}
bool DownloadManager::remove_torrent_file(const libtorrent::sha1_hash& p_sha1, const int delete_options)

int DownloadManager::listen_torrent_port()
{
if (m_torrent_session)
{
return m_torrent_session->listen_port();
}
return 0;
}
bool DownloadManager::remove_torrent_file(const libtorrent::sha1_hash& p_sha1, const int p_delete_options)
{
if (m_torrent_session)
{
lt::error_code ec;
try
{
const auto l_h = m_torrent_session->find_torrent(p_sha1);
// ConnectionManager::getInstance()->m_sha1_manager.addToken(p_sha1.to_string());
m_torrent_session->remove_torrent(l_h, delete_options);
m_torrent_session->remove_torrent(l_h, p_delete_options);
}
catch (const std::runtime_error& e)
{
Expand Down Expand Up @@ -1105,85 +1124,90 @@ bool DownloadManager::add_torrent_file(const tstring& p_torrent_path, const tstr
}
void DownloadManager::init_torrent()
{
lt::settings_pack l_sett;
l_sett.set_int(lt::settings_pack::alert_mask
, lt::alert::error_notification
| lt::alert::storage_notification
| lt::alert::status_notification
////// | lt::alert::all_categories
// | lt::alert::progress_notification
// | lt::alert::peer_notification
);
l_sett.set_str(settings_pack::user_agent, "FlylinkDC++ build " A_REVISION_NUM_STR); // LIBTORRENT_VERSION // A_VERSION_NUM_STR
l_sett.set_int(settings_pack::choking_algorithm, settings_pack::rate_based_choker);
l_sett.set_int(settings_pack::active_loaded_limit, 50); // TODO - êîíôèã

m_torrent_session = std::make_unique<lt::session>(l_sett);
m_torrent_session->start_lsd();
m_torrent_session->start_upnp();
m_torrent_session->start_natpmp();
//m_torrent_session->set_load_function(&load_torrent);
//m_torrent_session->set_download_rate_limit(10000);

l_sett.set_str(settings_pack::listen_interfaces, "0.0.0.0:8999");
lt::dht_settings dht;
//dht.privacy_lookups = true;
m_torrent_session->set_dht_settings(dht);

m_torrent_session->add_dht_router(std::make_pair(
std::string("router.bittorrent.com"), 6881));
m_torrent_session->add_dht_router(std::make_pair(
std::string("router.utorrent.com"), 6881));
m_torrent_session->add_dht_router(std::make_pair(
std::string("dht.transmissionbt.com"), 6881));
m_torrent_session->add_dht_router(std::make_pair(
std::string("router.bitcomet.com"), 6881));

m_torrent_session->start_dht();

/*
try
{
lt::error_code ec;
std::vector<char> in;
if (load_file(".ses_state", in, ec) == 0)
{
bdecode_node e;
if (bdecode(&in[0], &in[0] + in.size(), e, ec) == 0)
m_torrent_session->load_state(e, session::save_dht_state);
}
}
*/
lt::settings_pack l_sett;
l_sett.set_int(lt::settings_pack::alert_mask
, lt::alert::error_notification
| lt::alert::storage_notification
| lt::alert::status_notification
| lt::alert::port_mapping_notification
////// | lt::alert::all_categories
// | lt::alert::progress_notification
// | lt::alert::peer_notification
);
l_sett.set_str(settings_pack::user_agent, "FlylinkDC++ " A_REVISION_NUM_STR); // LIBTORRENT_VERSION // A_VERSION_NUM_STR
l_sett.set_int(settings_pack::choking_algorithm, settings_pack::rate_based_choker);
l_sett.set_int(settings_pack::active_loaded_limit, 50); // TODO - êîíôèã

m_torrent_session = std::make_unique<lt::session>(l_sett);
m_torrent_session->start_lsd();
m_torrent_session->start_upnp();
m_torrent_session->start_natpmp();
//m_torrent_session->set_load_function(&load_torrent);
//m_torrent_session->set_download_rate_limit(10000);

l_sett.set_str(settings_pack::listen_interfaces, "0.0.0.0:8999");
lt::dht_settings dht;
//dht.privacy_lookups = true;
m_torrent_session->set_dht_settings(dht);

m_torrent_session->add_dht_router(std::make_pair(
std::string("router.bittorrent.com"), 6881));
m_torrent_session->add_dht_router(std::make_pair(
std::string("router.utorrent.com"), 6881));
m_torrent_session->add_dht_router(std::make_pair(
std::string("dht.transmissionbt.com"), 6881));
m_torrent_session->add_dht_router(std::make_pair(
std::string("router.bitcomet.com"), 6881));

m_torrent_session->start_dht();

/*
{
lt::error_code ec;
std::vector<char> in;
if (load_file(".ses_state", in, ec) == 0)
{
bdecode_node e;
if (bdecode(&in[0], &in[0] + in.size(), e, ec) == 0)
m_torrent_session->load_state(e, session::save_dht_state);
}
}
*/
#ifdef _DEBUG
lt::error_code ec;
lt::add_torrent_params p;
p.save_path = SETTING(DOWNLOAD_DIRECTORY); // "."
p.storage_mode = storage_mode_sparse; //
//p.ti = std::make_shared<torrent_info>(std::string("D:\\1.torrent"), std::ref(ec), 0); // Strain - 4 ñåðèè!
//p.url = "magnet:?xt=urn:btih:519b3ea00fe118a1cc0b2c6b90d62c6f5ff204c0&dn=rutor.info_%D0%98%D0%BB%D0%BB%D1%8E%D0%B7%D0%B8%D1%8F+%D0%BE%D0%B1%D0%BC%D0%B0%D0%BD%D0%B0+2+%2F+Now+You+See+Me+2+%282016%29+BDRip+%D0%BE%D1%82+GeneralFilm+%7C+RUS+Transfer+%7C+%D0%9B%D0%B8%D1%86%D0%B5%D0%BD%D0%B7%D0%B8%D1%8F&tr=udp://opentor.org:2710&tr=udp://opentor.org:2710&tr=http://retracker.local/announce";
//p.url = "magnet:?xt=urn:btih:519b3ea00fe118a1cc0b2c6b90d62c6f5ff204c0&dn=rutor.info_%D0%98%D0%BB%D0%BB%D1%8E%D0%B7%D0%B8%D1%8F+%D0%BE%D0%B1%D0%BC%D0%B0%D0%BD%D0%B0+2+%2F+Now+You+See+Me+2+%282016%29+BDRip+%D0%BE%D1%82+GeneralFilm+%7C+RUS+Transfer+%7C+%D0%9B%D0%B8%D1%86%D0%B5%D0%BD%D0%B7%D0%B8%D1%8F";
//p.url = "magnet:?xt=urn:btih:b71555ecfd11c82c12ff1f94c7ec1c095b6deb63&dn=rutor.info_Stand+Up+SATRip";
//p.url = "magnet:?xt=urn:btih:0099d4cbf3b027f8f6e0d9bac7c57a16a56f7458&dn=rutor.info_Lake+Of+Tears+-+By+The+Black+Sea+%282014%29+MP3&tr=udp://opentor.org:2710&tr=udp://opentor.org:2710&tr=http://retracker.local/announce";
//p.url = "magnet:?xt=urn:btih:9017152afa06f5964c88faad524a6d443fdea787";
// ïðîáëåìíûé óðë - äâîèòñÿ
// http://kino-tor.org/torrent/526186/devjataja-zhizn-lui-draksa_the-9th-life-of-louis-drax-2016-web-dlrip-itunes
p.url = "magnet:?xt=urn:btih:c5e31d0c60206be872f6d51cf7f0b64ff83806ff&dn=rutor.info_%D0%94%D0%B5%D0%B2%D1%8F%D1%82%D0%B0%D1%8F+%D0%B6%D0%B8%D0%B7%D0%BD%D1%8C+%D0%9B%D1%83%D0%B8+%D0%94%D1%80%D0%B0%D0%BA%D1%81%D0%B0+%2F+The+9th+Life+of+Louis+Drax+%282016%29+WEB-DLRip+%7C+iTunes&tr=udp://opentor.org:2710&tr=udp://opentor.org:2710&tr=http://retracker.local/announce";

if (ec)
{
dcdebug("%s\n", ec.message().c_str());
dcassert(0);
//return 1;
lt::error_code ec;
lt::add_torrent_params p;
p.save_path = SETTING(DOWNLOAD_DIRECTORY); // "."
p.storage_mode = storage_mode_sparse; //
//p.ti = std::make_shared<torrent_info>(std::string("D:\\1.torrent"), std::ref(ec), 0); // Strain - 4 ñåðèè!
//p.url = "magnet:?xt=urn:btih:519b3ea00fe118a1cc0b2c6b90d62c6f5ff204c0&dn=rutor.info_%D0%98%D0%BB%D0%BB%D1%8E%D0%B7%D0%B8%D1%8F+%D0%BE%D0%B1%D0%BC%D0%B0%D0%BD%D0%B0+2+%2F+Now+You+See+Me+2+%282016%29+BDRip+%D0%BE%D1%82+GeneralFilm+%7C+RUS+Transfer+%7C+%D0%9B%D0%B8%D1%86%D0%B5%D0%BD%D0%B7%D0%B8%D1%8F&tr=udp://opentor.org:2710&tr=udp://opentor.org:2710&tr=http://retracker.local/announce";
//p.url = "magnet:?xt=urn:btih:519b3ea00fe118a1cc0b2c6b90d62c6f5ff204c0&dn=rutor.info_%D0%98%D0%BB%D0%BB%D1%8E%D0%B7%D0%B8%D1%8F+%D0%BE%D0%B1%D0%BC%D0%B0%D0%BD%D0%B0+2+%2F+Now+You+See+Me+2+%282016%29+BDRip+%D0%BE%D1%82+GeneralFilm+%7C+RUS+Transfer+%7C+%D0%9B%D0%B8%D1%86%D0%B5%D0%BD%D0%B7%D0%B8%D1%8F";
//p.url = "magnet:?xt=urn:btih:b71555ecfd11c82c12ff1f94c7ec1c095b6deb63&dn=rutor.info_Stand+Up+SATRip";
//p.url = "magnet:?xt=urn:btih:0099d4cbf3b027f8f6e0d9bac7c57a16a56f7458&dn=rutor.info_Lake+Of+Tears+-+By+The+Black+Sea+%282014%29+MP3&tr=udp://opentor.org:2710&tr=udp://opentor.org:2710&tr=http://retracker.local/announce";
//p.url = "magnet:?xt=urn:btih:9017152afa06f5964c88faad524a6d443fdea787";
// ïðîáëåìíûé óðë - äâîèòñÿ
// http://kino-tor.org/torrent/526186/devjataja-zhizn-lui-draksa_the-9th-life-of-louis-drax-2016-web-dlrip-itunes
p.url = "magnet:?xt=urn:btih:c5e31d0c60206be872f6d51cf7f0b64ff83806ff&dn=rutor.info_%D0%94%D0%B5%D0%B2%D1%8F%D1%82%D0%B0%D1%8F+%D0%B6%D0%B8%D0%B7%D0%BD%D1%8C+%D0%9B%D1%83%D0%B8+%D0%94%D1%80%D0%B0%D0%BA%D1%81%D0%B0+%2F+The+9th+Life+of+Louis+Drax+%282016%29+WEB-DLRip+%7C+iTunes&tr=udp://opentor.org:2710&tr=udp://opentor.org:2710&tr=http://retracker.local/announce";
if (ec)
{
dcdebug("%s\n", ec.message().c_str());
dcassert(0);
//return 1;
}
m_torrent_session->add_torrent(p, ec);
if (ec)
{
dcdebug("%s\n", ec.message().c_str());
dcassert(0);
//return 1;
}
#endif
}
m_torrent_session->add_torrent(p, ec);
if (ec)
catch (const std::exception& e)
{
dcdebug("%s\n", ec.message().c_str());
dcassert(0);
//return 1;
}

#endif

CFlyServerJSON::pushError(72, "DownloadManager::init_torrent error: " + std::string(e.what()));
}
}
#endif

Expand Down
2 changes: 2 additions & 0 deletions client/DownloadManager.h
Expand Up @@ -56,8 +56,10 @@ class DownloadManager : public Speaker<DownloadManagerListener>,
void init_torrent();
void onTimeTorrent(uint64_t aTick);
public:
void shutdown_torrent();
bool add_torrent_file(const tstring& p_torrent_path, const tstring& p_torrent_url);
bool remove_torrent_file(const libtorrent::sha1_hash& p_sha1, const int delete_options);
int listen_torrent_port();
#endif

public:
Expand Down

0 comments on commit 9c0919f

Please sign in to comment.