Skip to content

Commit

Permalink
modified new dht code to not allow torrent downloads unless the torre…
Browse files Browse the repository at this point in the history
…nt is public
  • Loading branch information
isdal committed Mar 12, 2012
1 parent 7bb9ff3 commit d9e919a
Showing 1 changed file with 15 additions and 0 deletions.
Expand Up @@ -41,6 +41,8 @@

import com.aelitis.azureus.plugins.dht.DHTPluginProgressListener;

import edu.washington.cs.oneswarm.f2f.permissions.PermissionsDAO;

/**
* @author parg
*
Expand Down Expand Up @@ -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 ){
Expand Down

0 comments on commit d9e919a

Please sign in to comment.