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 PeerGuardian .p2b binary filter support
|
||||||
- BUGFIX: Fix possible crash when closing a search engine tab
|
- BUGFIX: Fix possible crash when closing a search engine tab
|
||||||
- BUGFIX: Make sure service port does not change
|
- 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
|
* Wed Dec 23 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.3
|
||||||
- BUGFIX: Minor cosmetic fix to program preferences
|
- BUGFIX: Minor cosmetic fix to program preferences
|
||||||
|
|||||||
@@ -241,15 +241,10 @@ void Bittorrent::configureSession() {
|
|||||||
// Connection
|
// Connection
|
||||||
// * Ports binding
|
// * Ports binding
|
||||||
unsigned short old_listenPort = getListenPort();
|
unsigned short old_listenPort = getListenPort();
|
||||||
unsigned short new_listenPort;
|
unsigned short new_listenPort = Preferences::getSessionPort();
|
||||||
if(old_listenPort != Preferences::getSessionPort()) {
|
if(old_listenPort != new_listenPort) {
|
||||||
setListeningPort(Preferences::getSessionPort());
|
setListeningPort(new_listenPort);
|
||||||
new_listenPort = getListenPort();
|
addConsoleMessage(tr("qBittorrent is bound to port: TCP/%1", "e.g: qBittorrent is bound to port: 6881").arg( misc::toQString(new_listenPort)));
|
||||||
if(new_listenPort != old_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
|
// * Global download limit
|
||||||
int down_limit = Preferences::getGlobalDownloadLimit();
|
int down_limit = Preferences::getGlobalDownloadLimit();
|
||||||
@@ -351,8 +346,10 @@ void Bittorrent::configureSession() {
|
|||||||
if(Preferences::isDHTEnabled()) {
|
if(Preferences::isDHTEnabled()) {
|
||||||
// Set DHT Port
|
// Set DHT Port
|
||||||
if(enableDHT(true)) {
|
if(enableDHT(true)) {
|
||||||
int dht_port = new_listenPort;
|
int dht_port;
|
||||||
if(!Preferences::isDHTPortSameAsBT())
|
if(Preferences::isDHTPortSameAsBT())
|
||||||
|
dht_port = 0;
|
||||||
|
else
|
||||||
dht_port = Preferences::getDHTPort();
|
dht_port = Preferences::getDHTPort();
|
||||||
setDHTPort(dht_port);
|
setDHTPort(dht_port);
|
||||||
addConsoleMessage(tr("DHT support [ON], port: UDP/%1").arg(dht_port), QString::fromUtf8("blue"));
|
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 {
|
int options_imp::getDHTPort() const {
|
||||||
if(isDHTPortSameAsBT())
|
|
||||||
return 0;
|
|
||||||
return spinDHTPort->value();
|
return spinDHTPort->value();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user