mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
Merge pull request #6445 from Chocobo1/fix
Follow http user-agent format
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
|
||||
static const char PEER_ID[] = "qB";
|
||||
static const char RESUME_FOLDER[] = "BT_backup";
|
||||
static const char USER_AGENT[] = "qBittorrent " VERSION;
|
||||
static const char USER_AGENT[] = "qBittorrent/" QBT_VERSION; // to pass trackers whitelists, using the "v" prefixed version string
|
||||
|
||||
namespace libt = libtorrent;
|
||||
using namespace BitTorrent;
|
||||
@@ -310,7 +310,7 @@ Session::Session(QObject *parent)
|
||||
;
|
||||
|
||||
#if LIBTORRENT_VERSION_NUM < 10100
|
||||
libt::fingerprint fingerprint(PEER_ID, VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, VERSION_BUILD);
|
||||
libt::fingerprint fingerprint(PEER_ID, QBT_VERSION_MAJOR, QBT_VERSION_MINOR, QBT_VERSION_BUGFIX, QBT_VERSION_BUILD);
|
||||
std::string peerId = fingerprint.to_string();
|
||||
const ushort port = this->port();
|
||||
std::pair<int, int> ports(port, port);
|
||||
@@ -340,7 +340,7 @@ Session::Session(QObject *parent)
|
||||
dispatchAlerts(alertPtr.release());
|
||||
});
|
||||
#else
|
||||
std::string peerId = libt::generate_fingerprint(PEER_ID, VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, VERSION_BUILD);
|
||||
std::string peerId = libt::generate_fingerprint(PEER_ID, QBT_VERSION_MAJOR, QBT_VERSION_MINOR, QBT_VERSION_BUGFIX, QBT_VERSION_BUILD);
|
||||
libt::settings_pack pack;
|
||||
pack.set_int(libt::settings_pack::alert_mask, alertMask);
|
||||
pack.set_str(libt::settings_pack::peer_fingerprint, peerId);
|
||||
|
||||
Reference in New Issue
Block a user