2007-01-16 00:20:52 +01:00
|
|
|
--- apps/ktorrent/ktorrent.cpp
|
|
|
|
+++ apps/ktorrent/ktorrent.cpp 2006/05/23 15:57:30
|
|
|
|
@@ -320,6 +320,7 @@
|
|
|
|
|
|
|
|
//update QM
|
|
|
|
m_core->getQueueManager()->orderQueue();
|
|
|
|
+#if 0
|
|
|
|
dht::DHTBase & ht = Globals::instance().getDHT();
|
|
|
|
if (Settings::dhtSupport() && !ht.isRunning())
|
|
|
|
{
|
|
|
|
@@ -335,6 +336,7 @@
|
|
|
|
ht.stop();
|
|
|
|
ht.start(KGlobal::dirs()->saveLocation("data","ktorrent") + "dht_table",Settings::dhtPort());
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
if (Settings::useEncryption())
|
|
|
|
{
|
2007-02-09 16:56:00 +01:00
|
|
|
--- libktorrent/ktorrent.kcfg
|
|
|
|
+++ libktorrent/ktorrent.kcfg 2006/05/23 15:31:53
|
2007-01-16 00:20:52 +01:00
|
|
|
@@ -79,16 +79,6 @@
|
|
|
|
<label>GUI update interval</label>
|
|
|
|
<default>0</default>
|
|
|
|
</entry>
|
|
|
|
- <entry name="dhtSupport" type="Bool">
|
|
|
|
- <label>Support for DHT</label>
|
|
|
|
- <default>false</default>
|
|
|
|
- </entry>
|
|
|
|
- <entry name="dhtPort" type="Int">
|
|
|
|
- <label>DHT port</label>
|
|
|
|
- <default>6881</default>
|
|
|
|
- <min>0</min>
|
|
|
|
- <max>65535</max>
|
|
|
|
- </entry>
|
|
|
|
<entry name="numUploadSlots" type="Int">
|
|
|
|
<label>Number of upload slots</label>
|
|
|
|
<default>4</default>
|
|
|
|
--- apps/ktorrent/pref.cpp
|
|
|
|
+++ apps/ktorrent/pref.cpp 2006/05/23 15:59:53
|
|
|
|
@@ -153,12 +153,14 @@
|
|
|
|
Settings::setKeepSeeding(dp->keep_seeding->isChecked());
|
|
|
|
Settings::setPort(dp->port->value());
|
|
|
|
Settings::setNumUploadSlots(dp->num_upload_slots->value());
|
|
|
|
+#if 0
|
|
|
|
if (Settings::dhtSupport() && dp->udp_tracker_port->value() == Settings::dhtPort())
|
|
|
|
{
|
2007-02-09 16:56:00 +01:00
|
|
|
QString msg = i18n("The DHT port needs to be different from the UDP tracker port!");
|
2007-01-16 00:20:52 +01:00
|
|
|
KMessageBox::error(0,msg,i18n("Error"));
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
Settings::setUdpTrackerPort(dp->udp_tracker_port->value());
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
@@ -202,8 +204,10 @@
|
|
|
|
this,SLOT(autosaveChecked(bool )));
|
|
|
|
connect(gp->custom_ip_check,SIGNAL(toggled(bool)),
|
|
|
|
this,SLOT(customIPChecked(bool )));
|
|
|
|
+#if 0
|
|
|
|
connect(gp->use_dht,SIGNAL(toggled(bool)),
|
|
|
|
this,SLOT(dhtChecked( bool )));
|
|
|
|
+#endif
|
|
|
|
connect(gp->use_encryption,SIGNAL(toggled(bool)),
|
|
|
|
this,SLOT(useEncryptionChecked( bool )));
|
|
|
|
}
|
2007-02-09 16:56:00 +01:00
|
|
|
@@ -258,6 +262,7 @@
|
|
|
|
|
|
|
|
|
2007-01-16 00:20:52 +01:00
|
|
|
|
|
|
|
+#if 0
|
|
|
|
if (gp->use_dht->isChecked() && gp->dht_port->value() == Settings::udpTrackerPort())
|
|
|
|
{
|
2007-02-09 16:56:00 +01:00
|
|
|
QString msg = i18n("The DHT port needs to be different from the UDP tracker port!");
|
2007-01-16 00:20:52 +01:00
|
|
|
@@ -255,6 +260,7 @@
|
|
|
|
|
|
|
|
Settings::setDhtSupport(gp->use_dht->isChecked());
|
|
|
|
Settings::setDhtPort(gp->dht_port->value());
|
|
|
|
+#endif
|
|
|
|
Settings::setUseEncryption(gp->use_encryption->isChecked());
|
|
|
|
Settings::setAllowUnencryptedConnections(gp->allow_unencrypted->isChecked());
|
|
|
|
return true;
|
2007-02-09 16:56:00 +01:00
|
|
|
@@ -278,8 +284,10 @@
|
2007-01-16 00:20:52 +01:00
|
|
|
|
2007-02-09 16:56:00 +01:00
|
|
|
void GeneralPrefPage::dhtChecked(bool on)
|
2007-01-16 00:20:52 +01:00
|
|
|
{
|
|
|
|
+#if 0
|
|
|
|
gp->dht_port->setEnabled(on);
|
2007-02-09 16:56:00 +01:00
|
|
|
gp->dht_port_label->setEnabled(on);
|
2007-01-16 00:20:52 +01:00
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void PrefPageTwo::updateData()
|
2007-02-09 16:56:00 +01:00
|
|
|
@@ -333,10 +341,13 @@
|
|
|
|
gp->custom_ip->setEnabled(useExternalIP);
|
|
|
|
gp->custom_ip_label->setEnabled(useExternalIP);
|
|
|
|
|
|
|
|
+ gp->groupBox4->hide();
|
2007-01-16 00:20:52 +01:00
|
|
|
+#if 0
|
|
|
|
gp->use_dht->setChecked(Settings::dhtSupport());
|
|
|
|
gp->dht_port->setValue(Settings::dhtPort());
|
|
|
|
gp->dht_port->setEnabled(Settings::dhtSupport());
|
2007-02-09 16:56:00 +01:00
|
|
|
gp->dht_port_label->setEnabled(Settings::dhtSupport());
|
|
|
|
+#endif
|
|
|
|
|
2007-01-16 00:20:52 +01:00
|
|
|
gp->use_encryption->setChecked(Settings::useEncryption());
|
|
|
|
gp->allow_unencrypted->setChecked(Settings::allowUnencryptedConnections());
|
2007-03-06 17:52:31 +01:00
|
|
|
--- plugins/webinterface/php_interface.cpp 2007/03/06 09:40:49 1.1
|
|
|
|
+++ plugins/webinterface/php_interface.cpp 2007/03/06 09:42:44
|
|
|
|
@@ -130,7 +130,7 @@
|
|
|
|
ret.append(QString("\"max_upload_speed\" => \"%1\",").arg(core->getMaxUploadSpeed()));
|
|
|
|
ret.append(QString("\"max_downloads\" => \"%1\",").arg(Settings::maxDownloads()));
|
|
|
|
ret.append(QString("\"max_seeds\"=> \"%1\",").arg(Settings::maxSeeds()));
|
|
|
|
- ret.append(QString("\"dht_support\" => \"%1\",").arg(Settings::dhtSupport()));
|
|
|
|
+ ret.append(QString("\"dht_support\" => \"%1\",").arg(false));
|
|
|
|
ret.append(QString("\"use_encryption\" => \"%1\"").arg(Settings::useEncryption()));
|
|
|
|
ret.append(");\n}\n");
|
|
|
|
|
|
|
|
@@ -155,32 +155,6 @@
|
|
|
|
switch(it.key()[0])
|
|
|
|
{
|
2007-02-09 16:56:00 +01:00
|
|
|
case 'd':
|
2007-03-06 17:52:31 +01:00
|
|
|
- if(it.key()=="dht")
|
|
|
|
- {
|
2007-02-09 16:56:00 +01:00
|
|
|
- if(it.data()=="start")
|
|
|
|
- {
|
|
|
|
- Settings::setDhtSupport(true);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- Settings::setDhtSupport(false);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- dht::DHTBase & ht = Globals::instance().getDHT();
|
|
|
|
- if (Settings::dhtSupport() && !ht.isRunning())
|
|
|
|
- {
|
|
|
|
- ht.start(kt::DataDir() + "dht_table",Settings::dhtPort());
|
|
|
|
- }
|
|
|
|
- else if (!Settings::dhtSupport() && ht.isRunning())
|
|
|
|
- {
|
|
|
|
- ht.stop();
|
|
|
|
- }
|
|
|
|
- else if (Settings::dhtSupport() && ht.getPort() != Settings::dhtPort())
|
|
|
|
- {
|
|
|
|
- ht.stop();
|
|
|
|
- ht.start(kt::DataDir() + "dht_table",Settings::dhtPort());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
break;
|
|
|
|
case 'e':
|
2007-03-06 17:52:31 +01:00
|
|
|
if(it.key()=="encription")
|