mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-26 14:34:30 +00:00
- Fix some other listen port issues
This commit is contained in:
parent
1bfadf5219
commit
ff5e5d1062
@ -254,16 +254,11 @@ 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();
|
|
||||||
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)));
|
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();
|
||||||
if(down_limit <= 0) {
|
if(down_limit <= 0) {
|
||||||
@ -366,8 +361,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 = new_listenPort;
|
||||||
|
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"));
|
||||||
|
@ -1113,7 +1113,7 @@ QGroupBox {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>451</width>
|
<width>602</width>
|
||||||
<height>505</height>
|
<height>505</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -1534,8 +1534,8 @@ QGroupBox {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>466</width>
|
<width>620</width>
|
||||||
<height>368</height>
|
<height>495</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_19">
|
<layout class="QVBoxLayout" name="verticalLayout_19">
|
||||||
@ -1599,7 +1599,7 @@ QGroupBox {
|
|||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1000</number>
|
<number>1024</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>65525</number>
|
<number>65525</number>
|
||||||
@ -2345,8 +2345,8 @@ QGroupBox {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>620</width>
|
<width>290</width>
|
||||||
<height>495</height>
|
<height>124</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_21">
|
<layout class="QVBoxLayout" name="verticalLayout_21">
|
||||||
@ -2442,8 +2442,8 @@ QGroupBox {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>620</width>
|
<width>219</width>
|
||||||
<height>495</height>
|
<height>221</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_23">
|
<layout class="QVBoxLayout" name="verticalLayout_23">
|
||||||
@ -2606,8 +2606,8 @@ QGroupBox {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>620</width>
|
<width>452</width>
|
||||||
<height>495</height>
|
<height>192</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_24">
|
<layout class="QVBoxLayout" name="verticalLayout_24">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user