mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
- Fix possible issues with DHT service port
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
- BUGFIX: Fix PeerGuardian .p2b binary filter support
|
||||
- BUGFIX: Fix possible crash when closing a search engine tab
|
||||
- BUGFIX: Make sure service port does not change
|
||||
- BUGFIX: Fix possible DHT port saving issue
|
||||
|
||||
* Wed Dec 23 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.3
|
||||
- BUGFIX: Minor cosmetic fix to program preferences
|
||||
|
||||
@@ -241,16 +241,11 @@ void Bittorrent::configureSession() {
|
||||
// Connection
|
||||
// * Ports binding
|
||||
unsigned short old_listenPort = getListenPort();
|
||||
unsigned short new_listenPort;
|
||||
if(old_listenPort != Preferences::getSessionPort()) {
|
||||
setListeningPort(Preferences::getSessionPort());
|
||||
new_listenPort = getListenPort();
|
||||
if(new_listenPort != old_listenPort) {
|
||||
unsigned short new_listenPort = Preferences::getSessionPort();
|
||||
if(old_listenPort != new_listenPort) {
|
||||
setListeningPort(new_listenPort);
|
||||
addConsoleMessage(tr("qBittorrent is bound to port: TCP/%1", "e.g: qBittorrent is bound to port: 6881").arg( misc::toQString(new_listenPort)));
|
||||
}
|
||||
} else {
|
||||
new_listenPort = old_listenPort;
|
||||
}
|
||||
// * Global download limit
|
||||
int down_limit = Preferences::getGlobalDownloadLimit();
|
||||
if(down_limit <= 0) {
|
||||
@@ -351,8 +346,10 @@ void Bittorrent::configureSession() {
|
||||
if(Preferences::isDHTEnabled()) {
|
||||
// Set DHT Port
|
||||
if(enableDHT(true)) {
|
||||
int dht_port = new_listenPort;
|
||||
if(!Preferences::isDHTPortSameAsBT())
|
||||
int dht_port;
|
||||
if(Preferences::isDHTPortSameAsBT())
|
||||
dht_port = 0;
|
||||
else
|
||||
dht_port = Preferences::getDHTPort();
|
||||
setDHTPort(dht_port);
|
||||
addConsoleMessage(tr("DHT support [ON], port: UDP/%1").arg(dht_port), QString::fromUtf8("blue"));
|
||||
|
||||
@@ -868,8 +868,6 @@ bool options_imp::systrayIntegration() const{
|
||||
}
|
||||
|
||||
int options_imp::getDHTPort() const {
|
||||
if(isDHTPortSameAsBT())
|
||||
return 0;
|
||||
return spinDHTPort->value();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user