BUGFIX: Can listen on ports < 1024 (must be root)

This commit is contained in:
Christophe Dumez
2010-01-20 10:00:08 +00:00
parent 8f667dce5c
commit 5b104cdd9b
5 changed files with 23 additions and 13 deletions

View File

@@ -1602,9 +1602,9 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
}
}
// Set DHT port (>= 1000 or 0 if same as BT)
// Set DHT port (>= 1 or 0 if same as BT)
void Bittorrent::setDHTPort(int dht_port) {
if(dht_port == 0 || dht_port >= 1000) {
if(dht_port >= 0) {
if(dht_port == current_dht_port) return;
struct dht_settings DHTSettings;
DHTSettings.service_port = dht_port;