From d9e919a50505f0365db3feac5e74f12771218fbc Mon Sep 17 00:00:00 2001 From: isdal Date: Mon, 12 Mar 2012 10:13:46 -0700 Subject: [PATCH] modified new dht code to not allow torrent downloads unless the torrent is public --- .../pluginsimpl/local/ddb/DDBaseTTTorrent.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/az_src/src/org/gudy/azureus2/pluginsimpl/local/ddb/DDBaseTTTorrent.java b/az_src/src/org/gudy/azureus2/pluginsimpl/local/ddb/DDBaseTTTorrent.java index c0474c7a..138037ed 100644 --- a/az_src/src/org/gudy/azureus2/pluginsimpl/local/ddb/DDBaseTTTorrent.java +++ b/az_src/src/org/gudy/azureus2/pluginsimpl/local/ddb/DDBaseTTTorrent.java @@ -41,6 +41,8 @@ import com.aelitis.azureus.plugins.dht.DHTPluginProgressListener; +import edu.washington.cs.oneswarm.f2f.permissions.PermissionsDAO; + /** * @author parg * @@ -248,6 +250,19 @@ public class return( null ); } + if(!PermissionsDAO.get().hasPublicPermission(torrent.getHash())){ + + Debug.out( "Attempt to download f2f torrent" ); + + ddb.log( "TorrentDownload: request from " + originator + " for '" + download.getName() + "' denied as it is f2f only" ); + + // should never happen as f2f torrents are not tracked so they can't be found for + // download + + return( null ); + + } + String msg = "TorrentDownload: request from " + originator + " for '" + download.getName() + "' OK"; if ( TRACE ){