Rev. | 88 |
---|---|
Tamanho | 166,346 bytes |
Hora | 2010-02-03 22:26:52 |
Autor | heavy_baby |
Mensagem de Log | merged new localization |
? .svn
? com/.svn
? com/bitzi/.svn
? com/bitzi/util/.svn
? com/limegroup/.svn
? com/limegroup/bittorrent/.svn
? com/limegroup/bittorrent/bencoding/.svn
? com/limegroup/bittorrent/choking/.svn
? com/limegroup/bittorrent/dht/.svn
? com/limegroup/bittorrent/disk/.svn
? com/limegroup/bittorrent/handshaking/.svn
? com/limegroup/bittorrent/messages/.svn
? com/limegroup/bittorrent/reader/.svn
? com/limegroup/bittorrent/settings/.svn
? com/limegroup/bittorrent/statistics/.svn
? com/limegroup/bittorrent/tracking/.svn
? com/limegroup/gnutella/.svn
? com/limegroup/gnutella/altlocs/.svn
? com/limegroup/gnutella/archive/.svn
? com/limegroup/gnutella/auth/.svn
? com/limegroup/gnutella/bootstrap/.svn
? com/limegroup/gnutella/browser/.svn
? com/limegroup/gnutella/chat/.svn
? com/limegroup/gnutella/connection/.svn
? com/limegroup/gnutella/dht/.svn
? com/limegroup/gnutella/dht/db/.svn
? com/limegroup/gnutella/dht/impl/.svn
? com/limegroup/gnutella/dht/io/.svn
? com/limegroup/gnutella/dht/messages/.svn
? com/limegroup/gnutella/dht/util/.svn
? com/limegroup/gnutella/dime/.svn
? com/limegroup/gnutella/downloader/.svn
? com/limegroup/gnutella/downloader/serial/.svn
? com/limegroup/gnutella/downloader/serial/conversion/.svn
? com/limegroup/gnutella/filters/.svn
? com/limegroup/gnutella/geocode/.svn
? com/limegroup/gnutella/guess/.svn
? com/limegroup/gnutella/handshaking/.svn
? com/limegroup/gnutella/html/.svn
? com/limegroup/gnutella/http/.svn
? com/limegroup/gnutella/io/.svn
? com/limegroup/gnutella/library/.svn
? com/limegroup/gnutella/licenses/.svn
? com/limegroup/gnutella/lws/.svn
? com/limegroup/gnutella/lws/server/.svn
? com/limegroup/gnutella/messagehandlers/.svn
? com/limegroup/gnutella/messages/.svn
? com/limegroup/gnutella/messages/vendor/.svn
? com/limegroup/gnutella/metadata/.svn
? com/limegroup/gnutella/metadata/audio/.svn
? com/limegroup/gnutella/metadata/audio/reader/.svn
? com/limegroup/gnutella/metadata/audio/writer/.svn
? com/limegroup/gnutella/metadata/video/.svn
? com/limegroup/gnutella/metadata/video/reader/.svn
? com/limegroup/gnutella/mp3/.svn
? com/limegroup/gnutella/routing/.svn
? com/limegroup/gnutella/rudp/.svn
? com/limegroup/gnutella/rudp/messages/.svn
? com/limegroup/gnutella/search/.svn
? com/limegroup/gnutella/security/.svn
? com/limegroup/gnutella/settings/.svn
? com/limegroup/gnutella/simpp/.svn
? com/limegroup/gnutella/spam/.svn
? com/limegroup/gnutella/statistics/.svn
? com/limegroup/gnutella/templates/.svn
? com/limegroup/gnutella/tigertree/.svn
? com/limegroup/gnutella/tigertree/dime/.svn
? com/limegroup/gnutella/udpconnect/.svn
? com/limegroup/gnutella/updates/.svn
? com/limegroup/gnutella/uploader/.svn
? com/limegroup/gnutella/util/.svn
? com/limegroup/gnutella/version/.svn
? com/limegroup/gnutella/xml/.svn
? examples/.svn
? examples/mojito/.svn
? examples/mojito/org/.svn
? examples/mojito/org/limewire/.svn
? examples/mojito/org/limewire/mojito/.svn
? native/.svn
? native/linux/.svn
Index: com/limegroup/gnutella/ActivityCallback.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/ActivityCallback.java,v
retrieving revision 1.79
diff -u -r1.79 ActivityCallback.java
--- com/limegroup/gnutella/ActivityCallback.java 11 Mar 2008 17:19:18 -0000 1.79
+++ com/limegroup/gnutella/ActivityCallback.java 3 Feb 2010 12:07:52 -0000
@@ -5,12 +5,12 @@
import org.limewire.io.IpPort;
-import com.limegroup.gnutella.browser.MagnetOptions;
-import com.limegroup.gnutella.chat.InstantMessenger;
+//import com.limegroup.gnutella.browser.MagnetOptions;
+//import com.limegroup.gnutella.chat.InstantMessenger;
import com.limegroup.gnutella.connection.ConnectionLifecycleEvent;
import com.limegroup.gnutella.connection.ConnectionLifecycleListener;
import com.limegroup.gnutella.search.HostData;
-import com.limegroup.gnutella.version.UpdateInformation;
+//import com.limegroup.gnutella.version.UpdateInformation;
/**
* Defines the interface of a callback to notify about asynchronous backend
@@ -60,16 +60,16 @@
* for a connection has been completed and the connection is ready for
* sending and receiving of messages.
*/
- public void acceptChat(InstantMessenger ctr);
+// public void acceptChat(InstantMessenger ctr);
/** A new message is available from the given chatter. */
- public void receiveMessage(InstantMessenger chr, String messsage);
+// public void receiveMessage(InstantMessenger chr, String messsage);
/** The given chatter is no longer available */
- public void chatUnavailable(InstantMessenger chatter);
+// public void chatUnavailable(InstantMessenger chatter);
/** display an error message */
- public void chatErrorMessage(InstantMessenger chatter, String str);
+// public void chatErrorMessage(InstantMessenger chatter, String str);
/** display an error message since the browse host failed.
* @param guid The GUID of the browse host.
@@ -116,7 +116,7 @@
/**
* Notification that an update became available.
*/
- public void updateAvailable(UpdateInformation info);
+// public void updateAvailable(UpdateInformation info);
/**
* Sets the enabled/disabled state of file annotation.
@@ -156,7 +156,7 @@
* @param magnets Array of magnet information to handle
* @return true if the callback handles the magnet links
*/
- public boolean handleMagnets(MagnetOptions[] magnets);
+// public boolean handleMagnets(MagnetOptions[] magnets);
/**
* Indicates that the firewalled state of this has changed.
@@ -164,5 +164,5 @@
public void acceptedIncomingChanged(boolean status);
/** Try to download the torrent file */
- public void handleTorrent(File torrentFile);
+// public void handleTorrent(File torrentFile);
}
Index: com/limegroup/gnutella/ActivityCallbackAdapter.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/ActivityCallbackAdapter.java,v
retrieving revision 1.5
diff -u -r1.5 ActivityCallbackAdapter.java
--- com/limegroup/gnutella/ActivityCallbackAdapter.java 11 Mar 2008 17:19:18 -0000 1.5
+++ com/limegroup/gnutella/ActivityCallbackAdapter.java 3 Feb 2010 12:07:52 -0000
@@ -6,11 +6,11 @@
import org.limewire.io.IpPort;
import com.google.inject.Singleton;
-import com.limegroup.gnutella.browser.MagnetOptions;
-import com.limegroup.gnutella.chat.InstantMessenger;
+//import com.limegroup.gnutella.browser.MagnetOptions;
+//import com.limegroup.gnutella.chat.InstantMessenger;
import com.limegroup.gnutella.connection.ConnectionLifecycleEvent;
import com.limegroup.gnutella.search.HostData;
-import com.limegroup.gnutella.version.UpdateInformation;
+//import com.limegroup.gnutella.version.UpdateInformation;
/**
* Provides a default implementation of <code>ActivityCallback</code> where
@@ -20,9 +20,11 @@
@Singleton
public class ActivityCallbackAdapter implements ActivityCallback {
+ /*
public void acceptChat(InstantMessenger ctr) {
}
+ */
public void acceptedIncomingChanged(boolean status) {
@@ -36,6 +38,7 @@
}
+ /*
public void chatErrorMessage(InstantMessenger chatter, String str) {
}
@@ -43,6 +46,7 @@
public void chatUnavailable(InstantMessenger chatter) {
}
+ */
public void componentLoading(String component) {
@@ -68,9 +72,11 @@
}
+ /*
public boolean handleMagnets(MagnetOptions[] magnets) {
return false;
}
+ */
public void handleQueryResult(RemoteFileDesc rfd, HostData data,
Set<? extends IpPort> locs) {
@@ -85,9 +91,11 @@
}
+ /*
public void handleTorrent(File torrentFile) {
}
+ */
public void installationCorrupted() {
@@ -97,9 +105,11 @@
return false;
}
+ /*
public void receiveMessage(InstantMessenger chr, String messsage) {
}
+ */
public void removeUpload(Uploader u) {
@@ -113,9 +123,11 @@
}
+ /*
public void updateAvailable(UpdateInformation info) {
}
+ */
public void uploadsComplete() {
Index: com/limegroup/gnutella/ConnectionManager.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/ConnectionManager.java,v
retrieving revision 1.380
diff -u -r1.380 ConnectionManager.java
--- com/limegroup/gnutella/ConnectionManager.java 15 Apr 2008 02:16:28 -0000 1.380
+++ com/limegroup/gnutella/ConnectionManager.java 3 Feb 2010 12:07:52 -0000
@@ -58,7 +58,8 @@
/** The number of connections leaves should maintain to Ultrapeers. */
- public static final int PREFERRED_CONNECTIONS_FOR_LEAF = 3;
+// public static final int PREFERRED_CONNECTIONS_FOR_LEAF = 3;
+ public static final int PREFERRED_CONNECTIONS_FOR_LEAF = 4;
/** How many connect back requests to send if we have a single connection */
public static final int CONNECT_BACK_REDUNDANT_REQUESTS = 3;
/**
Index: com/limegroup/gnutella/DownloadManager.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/DownloadManager.java,v
retrieving revision 1.212
diff -u -r1.212 DownloadManager.java
--- com/limegroup/gnutella/DownloadManager.java 15 Apr 2008 02:16:28 -0000 1.212
+++ com/limegroup/gnutella/DownloadManager.java 3 Feb 2010 12:07:52 -0000
@@ -3,20 +3,21 @@
import java.io.File;
import java.net.Socket;
import java.util.Collection;
+import java.util.Iterator;
import java.util.List;
import org.limewire.listener.ListenerSupport;
-import com.limegroup.bittorrent.BTMetaInfo;
-import com.limegroup.gnutella.browser.MagnetOptions;
+//import com.limegroup.bittorrent.BTMetaInfo;
+//import com.limegroup.gnutella.browser.MagnetOptions;
import com.limegroup.gnutella.downloader.CantResumeException;
import com.limegroup.gnutella.downloader.CoreDownloader;
import com.limegroup.gnutella.downloader.IncompleteFileManager;
-import com.limegroup.gnutella.downloader.LWSIntegrationServicesDelegate;
+//import com.limegroup.gnutella.downloader.LWSIntegrationServicesDelegate;
import com.limegroup.gnutella.downloader.PushedSocketHandler;
import com.limegroup.gnutella.messages.QueryReply;
import com.limegroup.gnutella.messages.QueryRequest;
-import com.limegroup.gnutella.version.DownloadInformation;
+//import com.limegroup.gnutella.version.DownloadInformation;
/**
@@ -36,7 +37,8 @@
* serialized.
*/
public interface DownloadManager extends BandwidthTracker, SaveLocationManager,
-LWSIntegrationServicesDelegate, PushedSocketHandler, ListenerSupport<DownloadManagerEvent> {
+//LWSIntegrationServicesDelegate, PushedSocketHandler, ListenerSupport<DownloadManagerEvent> {
+PushedSocketHandler, ListenerSupport<DownloadManagerEvent> {
/**
* Adds a new downloader that this will manager.
@@ -69,7 +71,7 @@
* @param updates a current set of DownloadInformation that we are
* downloading in-network.
*/
- public void killDownloadersNotListed(Collection<? extends DownloadInformation> updates);
+// public void killDownloadersNotListed(Collection<? extends DownloadInformation> updates);
public boolean acceptPushedSocket(String file, int index, byte[] clientGUID, Socket socket);
@@ -165,8 +167,10 @@
* @throws SaveLocationException if the file can't save because of an
* existing file in the location
*/
+ /*
public Downloader download(MagnetOptions magnet, boolean overwrite, File saveDir,
String fileName) throws IllegalArgumentException, SaveLocationException;
+ */
/**
* Creates a new LimeWire Store (LWS) download. Store downloads are handled
@@ -186,8 +190,10 @@
* @throws IllegalArgumentException if there is a bad argument
* @throws SaveLocationException if the file is already downloading
*/
+ /*
public Downloader downloadFromStore(RemoteFileDesc rfd, boolean overwrite, File saveDir,
String fileName) throws IllegalArgumentException, SaveLocationException;
+ */
/**
* Starts a resume download for the given incomplete file.
@@ -202,10 +208,12 @@
/**
* Downloads an InNetwork update, using the info from the DownloadInformation.
*/
+ /*
public Downloader download(DownloadInformation info, long now) throws SaveLocationException;
public Downloader downloadTorrent(BTMetaInfo info, boolean overwrite)
throws SaveLocationException;
+ */
/**
* Returns <code>true</code> if there already is a download with the same urn.
@@ -279,4 +287,5 @@
* file was successfully written. */
public void writeSnapshot();
+ public Iterator getDownloads();
}
Index: com/limegroup/gnutella/DownloadManagerImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/DownloadManagerImpl.java,v
retrieving revision 1.11
diff -u -r1.11 DownloadManagerImpl.java
--- com/limegroup/gnutella/DownloadManagerImpl.java 15 May 2008 23:18:12 -0000 1.11
+++ com/limegroup/gnutella/DownloadManagerImpl.java 3 Feb 2010 12:07:53 -0000
@@ -30,26 +30,26 @@
import com.google.inject.Provider;
import com.google.inject.Singleton;
import com.google.inject.name.Named;
-import com.limegroup.bittorrent.BTMetaInfo;
-import com.limegroup.bittorrent.BTMetaInfoFactory;
-import com.limegroup.bittorrent.TorrentFileSystem;
-import com.limegroup.bittorrent.TorrentManager;
-import com.limegroup.gnutella.browser.MagnetOptions;
+//import com.limegroup.bittorrent.BTMetaInfo;
+//import com.limegroup.bittorrent.BTMetaInfoFactory;
+//import com.limegroup.bittorrent.TorrentFileSystem;
+//import com.limegroup.bittorrent.TorrentManager;
+//import com.limegroup.gnutella.browser.MagnetOptions;
import com.limegroup.gnutella.downloader.CantResumeException;
import com.limegroup.gnutella.downloader.CoreDownloader;
import com.limegroup.gnutella.downloader.CoreDownloaderFactory;
import com.limegroup.gnutella.downloader.DownloaderType;
-import com.limegroup.gnutella.downloader.InNetworkDownloader;
+//import com.limegroup.gnutella.downloader.InNetworkDownloader;
import com.limegroup.gnutella.downloader.IncompleteFileManager;
-import com.limegroup.gnutella.downloader.MagnetDownloader;
+//import com.limegroup.gnutella.downloader.MagnetDownloader;
import com.limegroup.gnutella.downloader.ManagedDownloader;
import com.limegroup.gnutella.downloader.PushDownloadManager;
import com.limegroup.gnutella.downloader.PushedSocketHandlerRegistry;
import com.limegroup.gnutella.downloader.RemoteFileDescFactory;
import com.limegroup.gnutella.downloader.ResumeDownloader;
-import com.limegroup.gnutella.downloader.StoreDownloader;
+//import com.limegroup.gnutella.downloader.StoreDownloader;
import com.limegroup.gnutella.downloader.Visitor;
-import com.limegroup.gnutella.downloader.serial.BTMetaInfoMemento;
+//import com.limegroup.gnutella.downloader.serial.BTMetaInfoMemento;
import com.limegroup.gnutella.downloader.serial.DownloadMemento;
import com.limegroup.gnutella.downloader.serial.DownloadSerializer;
import com.limegroup.gnutella.library.SharingUtils;
@@ -58,8 +58,8 @@
import com.limegroup.gnutella.messages.QueryRequest;
import com.limegroup.gnutella.search.HostData;
import com.limegroup.gnutella.settings.DownloadSettings;
-import com.limegroup.gnutella.settings.UpdateSettings;
-import com.limegroup.gnutella.version.DownloadInformation;
+//import com.limegroup.gnutella.settings.UpdateSettings;
+//import com.limegroup.gnutella.version.DownloadInformation;
@Singleton
public class DownloadManagerImpl implements DownloadManager {
@@ -124,43 +124,47 @@
new EventListenerList<DownloadManagerEvent>();
private final NetworkManager networkManager;
- private final DownloadCallback innetworkCallback;
+// private final DownloadCallback innetworkCallback;
private final Provider<DownloadCallback> downloadCallback;
private final Provider<MessageRouter> messageRouter;
private final ScheduledExecutorService backgroundExecutor;
- private final Provider<TorrentManager> torrentManager;
+// private final Provider<TorrentManager> torrentManager;
private final Provider<PushDownloadManager> pushDownloadManager;
private final CoreDownloaderFactory coreDownloaderFactory;
private final DownloadSerializer downloadSerializer;
private final IncompleteFileManager incompleteFileManager;
private final RemoteFileDescFactory remoteFileDescFactory;
- private final BTMetaInfoFactory btMetaInfoFactory;
+// private final BTMetaInfoFactory btMetaInfoFactory;
@Inject
public DownloadManagerImpl(NetworkManager networkManager,
- @Named("inNetwork") DownloadCallback innetworkCallback,
+// @Named("inNetwork") DownloadCallback innetworkCallback,
Provider<DownloadCallback> downloadCallback,
Provider<MessageRouter> messageRouter,
@Named("backgroundExecutor") ScheduledExecutorService backgroundExecutor,
- Provider<TorrentManager> torrentManager,
+// Provider<TorrentManager> torrentManager,
Provider<PushDownloadManager> pushDownloadManager,
CoreDownloaderFactory coreDownloaderFactory,
DownloadSerializer downloaderSerializer,
IncompleteFileManager incompleteFileManager,
+ /* cabos
RemoteFileDescFactory remoteFileDescFactory,
BTMetaInfoFactory btMetaInfoFactory) {
+ */
+ RemoteFileDescFactory remoteFileDescFactory) {
+
this.networkManager = networkManager;
- this.innetworkCallback = innetworkCallback;
+// this.innetworkCallback = innetworkCallback;
this.downloadCallback = downloadCallback;
this.messageRouter = messageRouter;
this.backgroundExecutor = backgroundExecutor;
- this.torrentManager = torrentManager;
+// this.torrentManager = torrentManager;
this.pushDownloadManager = pushDownloadManager;
this.coreDownloaderFactory = coreDownloaderFactory;
this.downloadSerializer = downloaderSerializer;
this.incompleteFileManager = incompleteFileManager;
this.remoteFileDescFactory = remoteFileDescFactory;
- this.btMetaInfoFactory = btMetaInfoFactory;
+// this.btMetaInfoFactory = btMetaInfoFactory;
}
/* (non-Javadoc)
@@ -284,6 +288,7 @@
/* (non-Javadoc)
* @see com.limegroup.gnutella.DownloadMI#killDownloadersNotListed(java.util.Collection)
*/
+ /*
public synchronized void killDownloadersNotListed(Collection<? extends DownloadInformation> updates) {
if (updates == null)
return;
@@ -304,6 +309,7 @@
hopeless.retainAll(urns);
UpdateSettings.FAILED_UPDATES.setValue(hopeless);
}
+ */
PushDownloadManager getPushManager() {
return pushDownloadManager.get();
@@ -563,6 +569,7 @@
/* (non-Javadoc)
* @see com.limegroup.gnutella.DownloadMI#download(com.limegroup.gnutella.browser.MagnetOptions, boolean, java.io.File, java.lang.String)
*/
+ /*
public synchronized Downloader download(MagnetOptions magnet,
boolean overwrite,
File saveDir,
@@ -597,10 +604,12 @@
initializeDownload(downloader, true);
return downloader;
}
+ */
/* (non-Javadoc)
* @see com.limegroup.gnutella.DownloadMI#downloadFromStore(com.limegroup.gnutella.RemoteFileDesc, boolean, java.io.File, java.lang.String)
*/
+ /*
public synchronized Downloader downloadFromStore( RemoteFileDesc rfd,
boolean overwrite,
File saveDir,
@@ -630,6 +639,7 @@
return downloader;
}
+ */
/* (non-Javadoc)
* @see com.limegroup.gnutella.DownloadMI#download(java.io.File)
@@ -642,8 +652,10 @@
(SaveLocationException.FILE_ALREADY_DOWNLOADING, incompleteFile);
}
+ /*
if (IncompleteFileManager.isTorrentFolder(incompleteFile))
return resumeTorrentDownload(incompleteFile);
+ */
//Check if file exists. TODO3: ideally we'd pass ALL conflicting files
//to the GUI, so they know what they're overwriting.
@@ -688,6 +700,7 @@
return downloader;
}
+ /*
private Downloader resumeTorrentDownload(File torrentFolder)
throws CantResumeException, SaveLocationException {
File infohash = null;
@@ -722,10 +735,12 @@
ret.resume();
return ret;
}
+ */
/* (non-Javadoc)
* @see com.limegroup.gnutella.DownloadMI#download(com.limegroup.gnutella.version.DownloadInformation, long)
*/
+ /*
public synchronized Downloader download(DownloadInformation info, long now)
throws SaveLocationException {
File dir = SharingUtils.PREFERENCE_SHARE;
@@ -740,10 +755,12 @@
initializeDownload(d, true);
return d;
}
+ */
/* (non-Javadoc)
* @see com.limegroup.gnutella.DownloadMI#downloadTorrent(com.limegroup.bittorrent.BTMetaInfo, boolean)
*/
+ /*
public synchronized Downloader downloadTorrent(BTMetaInfo info, boolean overwrite)
throws SaveLocationException {
TorrentFileSystem system = info.getFileSystem();
@@ -782,6 +799,7 @@
}
}
}
+ */
/**
* Performs common tasks for initializing the download.
@@ -809,7 +827,8 @@
* Returns the callback that should be used for the given md.
*/
private DownloadCallback callback(Downloader md) {
- return (md instanceof InNetworkDownloader) ? innetworkCallback : downloadCallback.get();
+// return (md instanceof InNetworkDownloader) ? innetworkCallback : downloadCallback.get();
+ return downloadCallback.get();
}
/**
@@ -1032,8 +1051,10 @@
float currentTotal = 0f;
boolean c = false;
for (BandwidthTracker bt : activeCopy) {
+ /*
if (bt instanceof InNetworkDownloader)
continue;
+ */
c = true;
bt.measureBandwidth();
@@ -1059,8 +1080,10 @@
float sum=0;
for (BandwidthTracker bt : activeCopy) {
+ /*
if (bt instanceof InNetworkDownloader)
continue;
+ */
float curr = 0;
try{
@@ -1123,4 +1146,14 @@
public boolean removeListener(EventListener<DownloadManagerEvent> listener) {
return listeners.removeListener(listener);
}
+
+ /* cabos */
+ public Iterator getDownloads() {
+ List downloads = new ArrayList();
+ synchronized (this) {
+ downloads.addAll(active);
+ downloads.addAll(waiting);
+ }
+ return downloads.iterator();
+ }
}
Index: com/limegroup/gnutella/DownloadServices.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/DownloadServices.java,v
retrieving revision 1.4
diff -u -r1.4 DownloadServices.java
--- com/limegroup/gnutella/DownloadServices.java 15 Nov 2007 18:14:07 -0000 1.4
+++ com/limegroup/gnutella/DownloadServices.java 3 Feb 2010 12:07:53 -0000
@@ -4,8 +4,8 @@
import java.io.IOException;
import java.util.List;
-import com.limegroup.bittorrent.BTMetaInfo;
-import com.limegroup.gnutella.browser.MagnetOptions;
+//import com.limegroup.bittorrent.BTMetaInfo;
+//import com.limegroup.gnutella.browser.MagnetOptions;
import com.limegroup.gnutella.downloader.CantResumeException;
public interface DownloadServices {
@@ -35,8 +35,10 @@
* @throws IllegalArgumentException if the magnet is not
* {@link MagnetOptions#isDownloadable() downloadable}.
*/
+ /*
public Downloader download(MagnetOptions magnet, boolean overwrite,
File saveDir, String fileName) throws SaveLocationException;
+ */
/**
* Creates a downloader for a magnet.
@@ -49,8 +51,10 @@
* @throws IllegalArgumentException if the magnet is not
* {@link MagnetOptions#isDownloadable() valid}.
*/
+ /*
public Downloader download(MagnetOptions magnet, boolean overwrite)
throws SaveLocationException;
+ */
/**
* Creates a downloader for songs purchased from the LimeWire Store (LWS)
@@ -62,8 +66,10 @@
* @return
* @throws SaveLocationException
*/
+ /*
public Downloader downloadFromStore(RemoteFileDesc rfd, boolean overwrite,
File saveDir, String fileName) throws SaveLocationException;
+ */
public Downloader download(RemoteFileDesc[] files, boolean overwrite,
GUID queryGUID) throws SaveLocationException;
@@ -126,8 +132,10 @@
* @throws IOException
* in case there was a problem reading the file
*/
+ /*
public Downloader downloadTorrent(BTMetaInfo info, boolean overwrite)
throws SaveLocationException;
+ */
/**
* Returns whether there are any active internet (non-multicast) transfers
Index: com/limegroup/gnutella/DownloadServicesImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/DownloadServicesImpl.java,v
retrieving revision 1.3
diff -u -r1.3 DownloadServicesImpl.java
--- com/limegroup/gnutella/DownloadServicesImpl.java 5 Oct 2007 21:42:04 -0000 1.3
+++ com/limegroup/gnutella/DownloadServicesImpl.java 3 Feb 2010 12:07:53 -0000
@@ -6,8 +6,8 @@
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
-import com.limegroup.bittorrent.BTMetaInfo;
-import com.limegroup.gnutella.browser.MagnetOptions;
+//import com.limegroup.bittorrent.BTMetaInfo;
+//import com.limegroup.gnutella.browser.MagnetOptions;
import com.limegroup.gnutella.downloader.CantResumeException;
@Singleton
@@ -31,14 +31,17 @@
/* (non-Javadoc)
* @see com.limegroup.gnutella.DownloadServices#download(com.limegroup.gnutella.browser.MagnetOptions, boolean, java.io.File, java.lang.String)
*/
+ /*
public Downloader download(MagnetOptions magnet, boolean overwrite,
File saveDir, String fileName) throws SaveLocationException {
return downloadManager.get().download(magnet, overwrite, saveDir, fileName);
}
+ */
/* (non-Javadoc)
* @see com.limegroup.gnutella.DownloadServices#download(com.limegroup.gnutella.browser.MagnetOptions, boolean)
*/
+ /*
public Downloader download(MagnetOptions magnet, boolean overwrite)
throws SaveLocationException {
if (!magnet.isDownloadable()) {
@@ -46,14 +49,17 @@
}
return downloadManager.get().download(magnet, overwrite, null, magnet.getDisplayName());
}
+ */
/*
* (non-Javadoc)
* @see com.limegroup.gnutella.DownloadServices#download(com.limegroup.store.StoreDescriptor, boolean, java.io.File, java.lang.String)
*/
+ /*
public Downloader downloadFromStore(RemoteFileDesc rfd, boolean overwrite, File saveDir, String fileName) throws SaveLocationException {
return downloadManager.get().downloadFromStore(rfd, overwrite, saveDir, fileName);
}
+ */
/* (non-Javadoc)
* @see com.limegroup.gnutella.DownloadServices#download(com.limegroup.gnutella.RemoteFileDesc[], boolean, com.limegroup.gnutella.GUID)
@@ -101,10 +107,12 @@
/* (non-Javadoc)
* @see com.limegroup.gnutella.DownloadServices#downloadTorrent(com.limegroup.bittorrent.BTMetaInfo, boolean)
*/
+ /*
public Downloader downloadTorrent(BTMetaInfo info, boolean overwrite)
throws SaveLocationException {
return downloadManager.get().downloadTorrent(info, overwrite);
}
+ */
/* (non-Javadoc)
* @see com.limegroup.gnutella.DownloadServices#getNumActiveDownloads()
Index: com/limegroup/gnutella/Downloader.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/Downloader.java,v
retrieving revision 1.65
diff -u -r1.65 Downloader.java
--- com/limegroup/gnutella/Downloader.java 15 Apr 2008 02:16:28 -0000 1.65
+++ com/limegroup/gnutella/Downloader.java 3 Feb 2010 12:07:53 -0000
@@ -321,5 +321,11 @@
* used.
*/
public String getCustomIconDescriptor();
+ /* cabos */
+ public String getActiveHostAddresses();
+
+ public boolean canceled();
+
+ public void cancel();
}
Index: com/limegroup/gnutella/ExtendedEndpoint.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/ExtendedEndpoint.java,v
retrieving revision 1.28
diff -u -r1.28 ExtendedEndpoint.java
--- com/limegroup/gnutella/ExtendedEndpoint.java 15 Apr 2008 02:16:28 -0000 1.28
+++ com/limegroup/gnutella/ExtendedEndpoint.java 3 Feb 2010 12:07:53 -0000
@@ -12,6 +12,8 @@
import org.limewire.io.NetworkUtils;
import org.limewire.util.StringUtils;
+import phex.common.Ip2CountryDB;
+
import com.limegroup.gnutella.dht.DHTManager.DHTMode;
import com.limegroup.gnutella.settings.ApplicationSettings;
import com.limegroup.gnutella.settings.ConnectionSettings;
@@ -114,6 +116,8 @@
super(host, port);
this.dailyUptime=dailyUptime;
this.timeRecorded=now();
+ /* cabos */
+ _clientLocale = Ip2CountryDB.getInstance().getIP2Language(host, _clientLocale);
}
/**
@@ -124,11 +128,15 @@
public ExtendedEndpoint(String host, int port) {
super(host, port);
this.timeRecorded=now();
+ /* cabos */
+ _clientLocale = Ip2CountryDB.getInstance().getIP2Language(host, _clientLocale);
}
public ExtendedEndpoint(InetAddress addr, int port) {
super(addr, port);
this.timeRecorded=now();
+ /* cabos */
+ _clientLocale = Ip2CountryDB.getInstance().getIP2Language(addr.getHostAddress(), _clientLocale);
}
/**
Index: com/limegroup/gnutella/FileManager.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/Attic/FileManager.java,v
retrieving revision 1.276
diff -u -r1.276 FileManager.java
--- com/limegroup/gnutella/FileManager.java 14 May 2008 18:21:31 -0000 1.276
+++ com/limegroup/gnutella/FileManager.java 3 Feb 2010 12:07:53 -0000
@@ -368,7 +368,7 @@
* @return true if currently we have any files that are
* shared by the application.
*/
- public abstract boolean hasApplicationSharedFiles();
+ //public abstract boolean hasApplicationSharedFiles();
/**
* Returns all files that are shared while not in shared directories.
@@ -473,7 +473,7 @@
* @return true if there exists an application-shared file with the
* provided name.
*/
- public abstract boolean isFileApplicationShared(String name);
+ //public abstract boolean isFileApplicationShared(String name);
/**
* registers a listener for FileManagerEvents
Index: com/limegroup/gnutella/FileManagerControllerImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/Attic/FileManagerControllerImpl.java,v
retrieving revision 1.10
diff -u -r1.10 FileManagerControllerImpl.java
--- com/limegroup/gnutella/FileManagerControllerImpl.java 3 Mar 2008 20:13:37 -0000 1.10
+++ com/limegroup/gnutella/FileManagerControllerImpl.java 3 Feb 2010 12:07:53 -0000
@@ -21,7 +21,7 @@
import com.limegroup.gnutella.metadata.MetaDataReader;
import com.limegroup.gnutella.simpp.SimppListener;
import com.limegroup.gnutella.simpp.SimppManager;
-import com.limegroup.gnutella.version.UpdateHandler;
+//import com.limegroup.gnutella.version.UpdateHandler;
import com.limegroup.gnutella.xml.LimeXMLDocument;
import com.limegroup.gnutella.xml.LimeXMLDocumentFactory;
import com.limegroup.gnutella.xml.LimeXMLProperties;
@@ -42,7 +42,7 @@
private final Provider<ResponseFactory> responseFactory;
private final Provider<SavedFileManager> savedFileManager;
private final Provider<SimppManager> simppManager;
- private final Provider<UpdateHandler> updateHandler;
+// private final Provider<UpdateHandler> updateHandler;
private final Provider<ActivityCallback> activityCallback;
private final ScheduledExecutorService backgroundExecutor;
private final LimeXMLReplyCollectionFactory limeXMLReplyCollectionFactory;
@@ -67,7 +67,7 @@
Provider<ResponseFactory> responseFactory,
Provider<SavedFileManager> savedFileManager,
Provider<SimppManager> simppManager,
- Provider<UpdateHandler> updateHandler,
+// Provider<UpdateHandler> updateHandler,
Provider<ActivityCallback> activityCallback,
@Named("backgroundExecutor") ScheduledExecutorService backgroundExecutor,
LimeXMLReplyCollectionFactory limeXMLReplyCollectionFactory,
@@ -83,7 +83,7 @@
this.responseFactory = responseFactory;
this.savedFileManager = savedFileManager;
this.simppManager = simppManager;
- this.updateHandler = updateHandler;
+// this.updateHandler = updateHandler;
this.activityCallback = activityCallback;
this.backgroundExecutor = backgroundExecutor;
this.limeXMLReplyCollectionFactory = limeXMLReplyCollectionFactory;
@@ -219,7 +219,7 @@
public void loadFinishedPostSave() {
savedFileManager.get().run();
- updateHandler.get().tryToDownloadUpdates();
+// updateHandler.get().tryToDownloadUpdates();
activityCallback.get().fileManagerLoaded();
}
Index: com/limegroup/gnutella/FileManagerImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/Attic/FileManagerImpl.java,v
retrieving revision 1.14
diff -u -r1.14 FileManagerImpl.java
--- com/limegroup/gnutella/FileManagerImpl.java 14 May 2008 18:21:31 -0000 1.14
+++ com/limegroup/gnutella/FileManagerImpl.java 3 Feb 2010 12:07:55 -0000
@@ -743,8 +743,8 @@
synchronized(_data.DIRECTORIES_NOT_TO_SHARE) {
_data.DIRECTORIES_NOT_TO_SHARE.clear();
_data.DIRECTORIES_NOT_TO_SHARE.addAll(canonicalize(blackListSet));
- _storeDirectories.clear();
- _storeDirectories.add(SharingSettings.getSaveLWSDirectory());
+// _storeDirectories.clear();
+// _storeDirectories.add(SharingSettings.getSaveLWSDirectory());
}
loadSettings();
}
@@ -869,8 +869,10 @@
dispatchFileEvent(new FileManagerEvent(this, Type.FILEMANAGER_LOADING));
// Update the FORCED_SHARE directory.
+ /*
updateSharedDirectories(SharingUtils.PROGRAM_SHARE, null, revision);
updateSharedDirectories(SharingUtils.PREFERENCE_SHARE, null, revision);
+ */
//Load the shared directories and add their files.
_isUpdating = true;
@@ -893,6 +895,7 @@
addFileIfSharedOrStore(file, EMPTY_DOCUMENTS, true, _revision, null, AddType.ADD_SHARE);
}
+ /*
// Update the store directory and add only files from the LWS
File storeDir = SharingSettings.getSaveLWSDirectory();
updateStoreDirectories(storeDir.getAbsoluteFile(), null, revision);
@@ -911,6 +914,7 @@
break;
addFileIfSharedOrStore(file, EMPTY_DOCUMENTS, true, _revision, null, AddType.ADD_STORE);
}
+ */
_isUpdating = false;
@@ -986,7 +990,8 @@
// STEP 1:
// Add directory
- boolean isForcedShare = SharingUtils.isForcedShareDirectory(directory);
+// boolean isForcedShare = SharingUtils.isForcedShareDirectory(directory);
+ boolean isForcedShare = false;
synchronized (this) {
// if it was already added, ignore.
@@ -1514,8 +1519,10 @@
assert parent != null : "Null parent to \""+file+"\"";
// files that are forcibly shared over the network
// aren't counted or shown.
+ /*
if(SharingUtils.isForcedShareDirectory(parent))
_numForcedFiles++;
+ */
loadKeywords(_keywordTrie, fileDesc);
@@ -1523,9 +1530,11 @@
// the installer. We populate free LimeWire's with free installers
// so we have to make sure we don't influence the what is new
// result set.
+ /*
if (!SharingUtils.isForcedShare(file)) {
fileManagerController.fileAdded(file, fileDesc.getSHA1Urn());
}
+ */
// Ensure file can be found by URN lookups
this.updateSharedUrnIndex(fileDesc);
@@ -1675,10 +1684,12 @@
File parent = f.getParentFile();
// files that are forcibly shared over the network aren't counted
+ /*
if(SharingUtils.isForcedShareDirectory(parent)) {
notify = false;
_numForcedFiles--;
}
+ */
removeKeywords(_keywordTrie, fd);
@@ -2049,6 +2060,7 @@
/* (non-Javadoc)
* @see com.limegroup.gnutella.FileManager#hasApplicationSharedFiles()
*/
+ /*
public boolean hasApplicationSharedFiles() {
File [] files = SharingUtils.APPLICATION_SPECIAL_SHARE.listFiles();
if (files == null)
@@ -2063,6 +2075,7 @@
return false;
}
+ */
/* (non-Javadoc)
* @see com.limegroup.gnutella.FileManager#getIndividualFiles()
@@ -2114,8 +2127,11 @@
*/
public boolean isIndividualShare(File f) {
return _data.SPECIAL_FILES_TO_SHARE.contains(f)
+ /* cabos
&& SharingUtils.isFilePhysicallyShareable(f)
&& !SharingUtils.isApplicationSpecialShare(f);
+ */
+ && SharingUtils.isFilePhysicallyShareable(f);
}
/**
@@ -2253,9 +2269,11 @@
if (folder.equals(SharingSettings.INCOMPLETE_DIRECTORY.getValue()))
return false;
+ /*
if (SharingUtils.isApplicationSpecialShareDirectory(folder)) {
return false;
}
+ */
// Do not share directories on the do not share list
if (includeExcludedDirectories && _data.DIRECTORIES_NOT_TO_SHARE.contains(folder))
@@ -2438,7 +2456,8 @@
FileDesc desc = _files.get(i);
// If the file was unshared or is an incomplete file,
// DO NOT SEND IT.
- if (desc==null || desc instanceof IncompleteFileDesc || SharingUtils.isForcedShare(desc))
+// if (desc==null || desc instanceof IncompleteFileDesc || SharingUtils.isForcedShare(desc))
+ if (desc==null || desc instanceof IncompleteFileDesc)
continue;
assert j<ret.length : "_numFiles is too small";
@@ -2572,6 +2591,7 @@
/* (non-Javadoc)
* @see com.limegroup.gnutella.FileManager#isFileApplicationShared(java.lang.String)
*/
+ /*
public boolean isFileApplicationShared(String name) {
File file = new File(SharingUtils.APPLICATION_SPECIAL_SHARE, name);
try {
@@ -2581,6 +2601,7 @@
}
return isFileShared(file);
}
+ */
/* (non-Javadoc)
@@ -2635,7 +2656,8 @@
index++;
// skip, if the file was unshared or is an incomplete file,
- if (desc == null || desc instanceof IncompleteFileDesc || SharingUtils.isForcedShare(desc))
+// if (desc == null || desc instanceof IncompleteFileDesc || SharingUtils.isForcedShare(desc))
+ if (desc == null || desc instanceof IncompleteFileDesc)
continue;
preview = fileManagerController.createResponse(desc);
Index: com/limegroup/gnutella/HTTPUploadManager.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/HTTPUploadManager.java,v
retrieving revision 1.27
diff -u -r1.27 HTTPUploadManager.java
--- com/limegroup/gnutella/HTTPUploadManager.java 11 Mar 2008 21:32:31 -0000 1.27
+++ com/limegroup/gnutella/HTTPUploadManager.java 3 Feb 2010 12:07:56 -0000
@@ -4,6 +4,8 @@
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -282,8 +284,11 @@
*/
private boolean shouldBypassQueue(HttpRequest request, HTTPUploader uploader) {
assert uploader.getState() == UploadStatus.CONNECTING;
+ /*
return "HEAD".equals(request.getRequestLine().getMethod())
|| uploader.isForcedShare();
+ */
+ return "HEAD".equals(request.getRequestLine().getMethod());
}
/**
@@ -333,9 +338,12 @@
public synchronized void addAcceptedUploader(HTTPUploader uploader, HttpContext context) {
assert started;
+ /* cabos
if (uploader.isForcedShare())
forcedUploads++;
else if (HttpContextParams.isLocal(context))
+ */
+ if (HttpContextParams.isLocal(context))
localUploads.add(uploader);
activeUploadList.add(uploader);
uploader.setStartTime(System.currentTimeMillis());
@@ -379,9 +387,11 @@
return false;
}
+ /*
if (fileManager.get().hasApplicationSharedFiles())
return slotManager.hasHTTPSlotForMeta(uploadsInProgress()
+ getNumQueuedUploads());
+ */
return isServiceable();
}
@@ -474,7 +484,8 @@
}
int queued = slotManager.pollForSlot(session, session.getUploader()
- .supportsQueueing(), session.getUploader().isPriorityShare());
+// .supportsQueueing(), session.getUploader().isPriorityShare());
+ .supportsQueueing(), false);
if (LOG.isDebugEnabled())
LOG.debug("queued at " + queued);
@@ -509,8 +520,10 @@
// host.
if (activeUploadList.remove(uploader)) {
+ /*
if (uploader.isForcedShare())
forcedUploads--;
+ */
// at this point it is safe to allow other uploads from the same
// host
@@ -836,4 +849,12 @@
}
+ /* cabos */
+ public Iterator getUploads() {
+ List uploads = new ArrayList();
+ synchronized (this) {
+ uploads.addAll(activeUploadList);
+ }
+ return uploads.iterator();
+ }
}
Index: com/limegroup/gnutella/HostCatcher.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/HostCatcher.java,v
retrieving revision 1.174.28.2
diff -u -r1.174.28.2 HostCatcher.java
--- com/limegroup/gnutella/HostCatcher.java 12 Sep 2008 20:33:21 -0000 1.174.28.2
+++ com/limegroup/gnutella/HostCatcher.java 3 Feb 2010 12:07:57 -0000
@@ -573,8 +573,18 @@
//Write elements of permanent from worst to best. Order matters, as it
//allows read() to put them into queue in the right order without any
//difficulty.
+ /* cabos
for(ExtendedEndpoint e : permanentHosts)
e.write(out);
+ */
+ String locale = ApplicationSettings.LANGUAGE.getValue();
+ boolean localePrefOK = ConnectionSettings.USE_LOCALE_PREF.getValue() &&
+ LOCALE_SET_MAP.containsKey(locale) &&
+ ((Set)LOCALE_SET_MAP.get(locale)).size() - 1 > ConnectionSettings.NUM_LOCALE_PREF.getValue();
+ for(ExtendedEndpoint e : permanentHosts) {
+ if (!localePrefOK || locale.equals(e.getClientLocale()) || e.supportsDHT())
+ e.write(out);
+ }
out.close();
}
@@ -612,7 +622,8 @@
}
//if the PingReply had locale information then set it in the endpoint
- if(!pr.getClientLocale().equals(""))
+// if(!pr.getClientLocale().equals(""))
+ if(!pr.getClientLocale().equals("en"))
endpoint.setClientLocale(pr.getClientLocale());
if(pr.isUDPHostCache()) {
Index: com/limegroup/gnutella/LifecycleManagerImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/LifecycleManagerImpl.java,v
retrieving revision 1.54.10.1
diff -u -r1.54.10.1 LifecycleManagerImpl.java
--- com/limegroup/gnutella/LifecycleManagerImpl.java 4 Jun 2008 15:11:46 -0000 1.54.10.1
+++ com/limegroup/gnutella/LifecycleManagerImpl.java 3 Feb 2010 12:07:58 -0000
@@ -23,7 +23,7 @@
import org.limewire.nio.ByteBufferCache;
import org.limewire.nio.ssl.SSLEngineTest;
import org.limewire.nio.ssl.SSLUtils;
-import org.limewire.promotion.PromotionServices;
+//import org.limewire.promotion.PromotionServices;
import org.limewire.rudp.UDPMultiplexor;
import org.limewire.service.ErrorService;
import org.limewire.setting.SettingsGroupManager;
@@ -37,38 +37,38 @@
import com.google.inject.Provider;
import com.google.inject.Singleton;
import com.google.inject.name.Named;
-import com.limegroup.bittorrent.TorrentManager;
-import com.limegroup.bittorrent.dht.DHTPeerLocator;
-import com.limegroup.bittorrent.dht.DHTPeerPublisher;
-import com.limegroup.bittorrent.handshaking.IncomingConnectionHandler;
+//import com.limegroup.bittorrent.TorrentManager;
+//import com.limegroup.bittorrent.dht.DHTPeerLocator;
+//import com.limegroup.bittorrent.dht.DHTPeerPublisher;
+//import com.limegroup.bittorrent.handshaking.IncomingConnectionHandler;
import com.limegroup.gnutella.altlocs.DownloaderGuidAlternateLocationFinder;
import com.limegroup.gnutella.auth.ContentManager;
-import com.limegroup.gnutella.browser.ControlRequestAcceptor;
-import com.limegroup.gnutella.browser.LocalAcceptor;
-import com.limegroup.gnutella.browser.LocalHTTPAcceptor;
-import com.limegroup.gnutella.chat.ChatManager;
+//import com.limegroup.gnutella.browser.ControlRequestAcceptor;
+//import com.limegroup.gnutella.browser.LocalAcceptor;
+//import com.limegroup.gnutella.browser.LocalHTTPAcceptor;
+//import com.limegroup.gnutella.chat.ChatManager;
import com.limegroup.gnutella.dht.DHTManager;
import com.limegroup.gnutella.dht.db.PushProxiesPublisher;
import com.limegroup.gnutella.downloader.IncompleteFileManager;
-import com.limegroup.gnutella.downloader.LWSIntegrationServices;
+//import com.limegroup.gnutella.downloader.LWSIntegrationServices;
import com.limegroup.gnutella.downloader.PushDownloadManager;
import com.limegroup.gnutella.downloader.serial.conversion.DownloadUpgradeTask;
import com.limegroup.gnutella.filters.IPFilter;
import com.limegroup.gnutella.library.SharingUtils;
import com.limegroup.gnutella.licenses.LicenseFactory;
-import com.limegroup.gnutella.lws.server.LWSManager;
+//import com.limegroup.gnutella.lws.server.LWSManager;
import com.limegroup.gnutella.messages.StaticMessages;
import com.limegroup.gnutella.rudp.messages.LimeRUDPMessageHandler;
import com.limegroup.gnutella.settings.ApplicationSettings;
import com.limegroup.gnutella.settings.ConnectionSettings;
-import com.limegroup.gnutella.settings.LWSSettings;
+//import com.limegroup.gnutella.settings.LWSSettings;
import com.limegroup.gnutella.settings.SSLSettings;
import com.limegroup.gnutella.settings.SharingSettings;
import com.limegroup.gnutella.simpp.SimppListener;
import com.limegroup.gnutella.simpp.SimppManager;
import com.limegroup.gnutella.spam.RatingTable;
import com.limegroup.gnutella.tigertree.HashTreeCache;
-import com.limegroup.gnutella.version.UpdateHandler;
+//import com.limegroup.gnutella.version.UpdateHandler;
/**
* Provides an implementation of the <code>LifecycleManager</code> to start and
@@ -107,17 +107,17 @@
private final Provider<NodeAssigner> nodeAssigner;
private final Provider<HostCatcher> hostCatcher;
private final Provider<FileManager> fileManager;
- private final Provider<TorrentManager> torrentManager;
+// private final Provider<TorrentManager> torrentManager;
private final Provider<ConnectionDispatcher> connectionDispatcher;
- private final Provider<UpdateHandler> updateHandler;
+// private final Provider<UpdateHandler> updateHandler;
private final Provider<QueryUnicaster> queryUnicaster;
- private final Provider<LocalHTTPAcceptor> localHttpAcceptor;
- private final Provider<LocalAcceptor> localAcceptor;
+// private final Provider<LocalHTTPAcceptor> localHttpAcceptor;
+// private final Provider<LocalAcceptor> localAcceptor;
private final Provider<Pinger> pinger;
private final Provider<ConnectionWatchdog> connectionWatchdog;
private final Provider<SavedFileManager> savedFileManager;
private final Provider<RatingTable> ratingTable;
- private final Provider<ChatManager> chatManager;
+// private final Provider<ChatManager> chatManager;
private final Provider<UDPMultiplexor> udpMultiplexor;
private final Provider<HashTreeCache> tigerTreeCache;
private final Provider<DHTManager> dhtManager;
@@ -126,10 +126,10 @@
private final Provider<Statistics> statistics;
private final Provider<ConnectionServices> connectionServices;
private final Provider<SpamServices> spamServices;
- private final Provider<ControlRequestAcceptor> controlRequestAcceptor;
+// private final Provider<ControlRequestAcceptor> controlRequestAcceptor;
private final Provider<LimeCoreGlue> limeCoreGlue;
- private final Provider<LWSManager> lwsManager;
- private final Provider<LWSIntegrationServices> lwsItegrationServices;
+// private final Provider<LWSManager> lwsManager;
+// private final Provider<LWSIntegrationServices> lwsItegrationServices;
private final Provider<OutOfBandThroughputMeasurer> outOfBandThroughputMeasurer;
private final Provider<BrowseHostHandlerManager> browseHostHandlerManager;
private final Provider<DownloadUpgradeTask> downloadUpgradeTask;
@@ -146,9 +146,9 @@
private final Provider<ConnectionDispatcher> localConnectionDispatcher;
private final Provider<DownloaderGuidAlternateLocationFinder> magnetDownloaderPushEndpointFinder;
private final Provider<PushProxiesPublisher> pushProxiesPublisher;
- private final Provider<DHTPeerLocator> dhtPeerLocator;
- private final Provider<DHTPeerPublisher> dhtPeerPublisher;
- private final Provider<PromotionServices> promotionServices;
+// private final Provider<DHTPeerLocator> dhtPeerLocator;
+// private final Provider<DHTPeerPublisher> dhtPeerPublisher;
+// private final Provider<PromotionServices> promotionServices;
@Inject
public LifecycleManagerImpl(
@@ -166,18 +166,18 @@
Provider<NodeAssigner> nodeAssigner,
Provider<HostCatcher> hostCatcher,
Provider<FileManager> fileManager,
- Provider<TorrentManager> torrentManager,
+// Provider<TorrentManager> torrentManager,
@Named("global") Provider<ConnectionDispatcher> connectionDispatcher,
@Named("local") Provider<ConnectionDispatcher> localConnectionDispatcher,
- Provider<UpdateHandler> updateHandler,
+// Provider<UpdateHandler> updateHandler,
Provider<QueryUnicaster> queryUnicaster,
- Provider<LocalHTTPAcceptor> localHttpAcceptor,
- Provider<LocalAcceptor> localAcceptor,
+// Provider<LocalHTTPAcceptor> localHttpAcceptor,
+// Provider<LocalAcceptor> localAcceptor,
Provider<Pinger> pinger,
Provider<ConnectionWatchdog> connectionWatchdog,
Provider<SavedFileManager> savedFileManager,
Provider<RatingTable> ratingTable,
- Provider<ChatManager> chatManager,
+// Provider<ChatManager> chatManager,
Provider<UDPMultiplexor> udpMultiplexor,
Provider<HashTreeCache> tigerTreeCache,
Provider<DHTManager> dhtManager,
@@ -187,21 +187,24 @@
Provider<Statistics> statistics,
Provider<ConnectionServices> connectionServices,
Provider<SpamServices> spamServices,
- Provider<ControlRequestAcceptor> controlRequestAcceptor,
- Provider<IncomingConnectionHandler> incomingConnectionHandler,
+// Provider<ControlRequestAcceptor> controlRequestAcceptor,
+// Provider<IncomingConnectionHandler> incomingConnectionHandler,
Provider<LicenseFactory> licenseFactory,
Provider<LimeCoreGlue> limeCoreGlue,
- Provider<LWSManager> lwsManager,
- Provider<LWSIntegrationServices> lwsItegrationServices,
+// Provider<LWSManager> lwsManager,
+// Provider<LWSIntegrationServices> lwsItegrationServices,
Provider<OutOfBandThroughputMeasurer> outOfBandThroughputMeasurer,
Provider<BrowseHostHandlerManager> browseHostHandlerManager,
Provider<DownloadUpgradeTask> downloadUpgradeTask,
Provider<StatisticAccumulator> statisticAccumulator,
Provider<DownloaderGuidAlternateLocationFinder> magnetDownloaderPushEndpointFinder,
+ /* cabos
Provider<PushProxiesPublisher> pushProxiesPublisher,
Provider<DHTPeerLocator> dhtPeerLocator,
Provider<DHTPeerPublisher> dhtPeerPublisher,
Provider<PromotionServices> promotionServices) {
+ */
+ Provider<PushProxiesPublisher> pushProxiesPublisher) {
this.ipFilter = ipFilter;
this.simppManager = simppManager;
this.acceptor = acceptor;
@@ -217,18 +220,18 @@
this.nodeAssigner = nodeAssigner;
this.hostCatcher = hostCatcher;
this.fileManager = fileManager;
- this.torrentManager = torrentManager;
+// this.torrentManager = torrentManager;
this.connectionDispatcher = connectionDispatcher;
this.localConnectionDispatcher = localConnectionDispatcher;
- this.updateHandler = updateHandler;
+// this.updateHandler = updateHandler;
this.queryUnicaster = queryUnicaster;
- this.localHttpAcceptor = localHttpAcceptor;
- this.localAcceptor = localAcceptor;
+// this.localHttpAcceptor = localHttpAcceptor;
+// this.localAcceptor = localAcceptor;
this.pinger = pinger;
this.connectionWatchdog = connectionWatchdog;
this.savedFileManager = savedFileManager;
this.ratingTable = ratingTable;
- this.chatManager = chatManager;
+// this.chatManager = chatManager;
this.udpMultiplexor = udpMultiplexor;
this.tigerTreeCache = tigerTreeCache;
this.dhtManager = dhtManager;
@@ -237,20 +240,20 @@
this.statistics = statistics;
this.connectionServices = connectionServices;
this.spamServices = spamServices;
- this.controlRequestAcceptor = controlRequestAcceptor;
+// this.controlRequestAcceptor = controlRequestAcceptor;
this.licenseFactory = licenseFactory;
this.limeCoreGlue = limeCoreGlue;
- this.lwsManager = lwsManager;
- this.lwsItegrationServices = lwsItegrationServices;
+// this.lwsManager = lwsManager;
+// this.lwsItegrationServices = lwsItegrationServices;
this.outOfBandThroughputMeasurer = outOfBandThroughputMeasurer;
this.browseHostHandlerManager = browseHostHandlerManager;
this.downloadUpgradeTask = downloadUpgradeTask;
this.statisticAccumulator = statisticAccumulator;
this.magnetDownloaderPushEndpointFinder = magnetDownloaderPushEndpointFinder;
this.pushProxiesPublisher = pushProxiesPublisher;
- this.dhtPeerLocator = dhtPeerLocator;
- this.dhtPeerPublisher = dhtPeerPublisher;
- this.promotionServices = promotionServices;
+// this.dhtPeerLocator = dhtPeerLocator;
+// this.dhtPeerPublisher = dhtPeerPublisher;
+// this.promotionServices = promotionServices;
}
/* (non-Javadoc)
@@ -397,10 +400,12 @@
messageRouter.get().start();
LOG.trace("STOPMessageRouter");
+ /*
LOG.trace("START UpdateManager.instance");
activityCallback.get().componentLoading(I18nMarker.marktr("Checking for Updates..."));
updateHandler.get().initialize();
LOG.trace("STOP UpdateManager.instance");
+ */
LOG.trace("START HTTPUploadManager");
activityCallback.get().componentLoading(I18nMarker.marktr("Loading Upload Management..."));
@@ -466,19 +471,23 @@
fileManager.get().start();
LOG.trace("STOP FileManager");
+ /*
LOG.trace("START TorrentManager");
activityCallback.get().componentLoading(I18nMarker.marktr("Loading BitTorrent Management..."));
torrentManager.get().initialize(connectionDispatcher.get());
LOG.trace("STOP TorrentManager");
+ */
// add listener before downloads are read to get all add events
downloadManager.get().addListener(magnetDownloaderPushEndpointFinder.get());
// initialize DHTPeerLocator and DHTPeerPublishers
+ /*
LOG.trace("START DHTPeerLocator and DHTPeerPublisher");
dhtPeerLocator.get().init();
dhtPeerPublisher.get().init();
LOG.trace("STOP DHTPeerLocator and DHTPeerPublisher");
+ */
// Restore any downloads in progress.
LOG.trace("START DownloadManager.postGuiInit");
@@ -486,16 +495,19 @@
downloadManager.get().loadSavedDownloadsAndScheduleWriting();
LOG.trace("STOP DownloadManager.postGuiInit");
+ /*
LOG.trace("START LWSIntegrationServices.postGuiInit");
activityCallback.get().componentLoading(I18nMarker.marktr("Attaching LimeWire Store Listeners..."));
lwsItegrationServices.get().init();
LOG.trace("STOP LWSIntegrationServices.postGuiInit");
+ */
LOG.trace("START QueryUnicaster");
activityCallback.get().componentLoading(I18nMarker.marktr("Loading Directed Querier..."));
queryUnicaster.get().start();
LOG.trace("STOP QueryUnicaster");
+ /*
LOG.trace("START LocalHTTPAcceptor");
activityCallback.get().componentLoading(I18nMarker.marktr("Loading Magnet Listener..."));
localHttpAcceptor.get().start();
@@ -506,6 +518,7 @@
initializeLocalConnectionDispatcher();
localAcceptor.get().start();
LOG.trace("STOP LocalAcceptor");
+ */
LOG.trace("START Pinger");
activityCallback.get().componentLoading(I18nMarker.marktr("Loading Peer Listener..."));
@@ -538,6 +551,7 @@
LOG.trace("STOP Random Initializings");
// Allow us to disable this remotely is needed
+ /*
if (LWSSettings.LWS_IS_ENABLED.getValue()) {
LOG.trace("START StoreServer");
localHttpAcceptor.get().registerHandler("/" + LWSManager.PREFIX + "*", lwsManager.get().getHandler());
@@ -549,6 +563,7 @@
LOG.trace("START loading promotion system");
activityCallback.get().componentLoading(I18nMarker.marktr("Loading Promotion System..."));
promotionServices.get().init();
+ */
if(ApplicationSettings.AUTOMATIC_MANUAL_GC.getValue())
startManualGCThread();
@@ -559,14 +574,18 @@
}
private void initializeConnectionDispatcher() {
+ /*
connectionDispatcher.get().addConnectionAcceptor(controlRequestAcceptor.get(),
true, "MAGNET","TORRENT");
connectionDispatcher.get().addConnectionAcceptor(chatManager.get(), false, "CHAT");
+ */
}
private void initializeLocalConnectionDispatcher() {
+ /*
localConnectionDispatcher.get().addConnectionAcceptor(controlRequestAcceptor.get(),
true, "MAGNET", "TORRENT");
+ */
}
/* (non-Javadoc)
@@ -632,7 +651,7 @@
cleanupPreviewFiles();
- cleanupTorrentMetadataFiles();
+ //cleanupTorrentMetadataFiles();
downloadManager.get().writeSnapshot();
@@ -650,11 +669,11 @@
messageRouter.get().stop();
- localAcceptor.get().stop();
+// localAcceptor.get().stop();
statisticAccumulator.get().stop();
- promotionServices.get().shutDown();
+// promotionServices.get().shutDown();
runShutdownItems();
@@ -787,6 +806,7 @@
LOG.trace("Started manual GC thread.");
}
+ /*
private void cleanupTorrentMetadataFiles() {
if(!fileManager.get().isLoadFinished()) {
return;
@@ -813,6 +833,7 @@
}
}
}
+ */
/** Deletes all preview files. */
private void cleanupPreviewFiles() {
Index: com/limegroup/gnutella/LimeWireCore.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/Attic/LimeWireCore.java,v
retrieving revision 1.71
diff -u -r1.71 LimeWireCore.java
--- com/limegroup/gnutella/LimeWireCore.java 22 May 2008 22:57:59 -0000 1.71
+++ com/limegroup/gnutella/LimeWireCore.java 3 Feb 2010 12:07:58 -0000
@@ -7,8 +7,8 @@
import org.limewire.net.ConnectionDispatcher;
import org.limewire.net.SocketsManager;
import org.limewire.nio.NIODispatcher;
-import org.limewire.promotion.PromotionSearcher;
-import org.limewire.promotion.PromotionServices;
+//import org.limewire.promotion.PromotionSearcher;
+//import org.limewire.promotion.PromotionServices;
import org.limewire.rudp.RUDPContext;
import org.limewire.rudp.UDPMultiplexor;
import org.limewire.rudp.UDPSelectorProvider;
@@ -20,27 +20,27 @@
import com.google.inject.Provider;
import com.google.inject.Singleton;
import com.google.inject.name.Names;
-import com.limegroup.bittorrent.BTContextFactory;
-import com.limegroup.bittorrent.BTMetaInfoFactory;
-import com.limegroup.bittorrent.BTUploaderFactory;
-import com.limegroup.bittorrent.ManagedTorrentFactory;
-import com.limegroup.bittorrent.TorrentManager;
-import com.limegroup.bittorrent.dht.DHTPeerLocator;
-import com.limegroup.bittorrent.dht.DHTPeerPublisher;
-import com.limegroup.bittorrent.disk.DiskManagerFactory;
-import com.limegroup.bittorrent.handshaking.IncomingConnectionHandler;
-import com.limegroup.bittorrent.tracking.TrackerFactory;
-import com.limegroup.bittorrent.tracking.TrackerManagerFactory;
+//import com.limegroup.bittorrent.BTContextFactory;
+//import com.limegroup.bittorrent.BTMetaInfoFactory;
+//import com.limegroup.bittorrent.BTUploaderFactory;
+//import com.limegroup.bittorrent.ManagedTorrentFactory;
+//import com.limegroup.bittorrent.TorrentManager;
+//import com.limegroup.bittorrent.dht.DHTPeerLocator;
+//import com.limegroup.bittorrent.dht.DHTPeerPublisher;
+//import com.limegroup.bittorrent.disk.DiskManagerFactory;
+//import com.limegroup.bittorrent.handshaking.IncomingConnectionHandler;
+//import com.limegroup.bittorrent.tracking.TrackerFactory;
+//import com.limegroup.bittorrent.tracking.TrackerManagerFactory;
import com.limegroup.gnutella.altlocs.AltLocManager;
import com.limegroup.gnutella.altlocs.AlternateLocationFactory;
import com.limegroup.gnutella.auth.ContentManager;
import com.limegroup.gnutella.auth.IpPortContentAuthorityFactory;
import com.limegroup.gnutella.bootstrap.UDPHostCacheFactory;
-import com.limegroup.gnutella.browser.ExternalControl;
-import com.limegroup.gnutella.browser.LocalAcceptor;
-import com.limegroup.gnutella.browser.LocalHTTPAcceptor;
-import com.limegroup.gnutella.chat.ChatManager;
-import com.limegroup.gnutella.chat.InstantMessengerFactory;
+//import com.limegroup.gnutella.browser.ExternalControl;
+//import com.limegroup.gnutella.browser.LocalAcceptor;
+//import com.limegroup.gnutella.browser.LocalHTTPAcceptor;
+//import com.limegroup.gnutella.chat.ChatManager;
+//import com.limegroup.gnutella.chat.InstantMessengerFactory;
import com.limegroup.gnutella.connection.ConnectionCheckerManager;
import com.limegroup.gnutella.connection.MessageReaderFactory;
import com.limegroup.gnutella.connection.RoutedConnectionFactory;
@@ -56,7 +56,7 @@
import com.limegroup.gnutella.filters.IPFilter;
import com.limegroup.gnutella.filters.MutableGUIDFilter;
import com.limegroup.gnutella.filters.SpamFilterFactory;
-import com.limegroup.gnutella.geocode.CachedGeoLocation;
+//import com.limegroup.gnutella.geocode.CachedGeoLocation;
import com.limegroup.gnutella.guess.OnDemandUnicaster;
import com.limegroup.gnutella.handshaking.HandshakeResponderFactory;
import com.limegroup.gnutella.handshaking.HeadersFactory;
@@ -65,7 +65,7 @@
import com.limegroup.gnutella.licenses.LicenseCache;
import com.limegroup.gnutella.licenses.LicenseFactory;
import com.limegroup.gnutella.licenses.LicenseVerifier;
-import com.limegroup.gnutella.lws.server.LWSManager;
+//import com.limegroup.gnutella.lws.server.LWSManager;
import com.limegroup.gnutella.messagehandlers.InspectionRequestHandler;
import com.limegroup.gnutella.messagehandlers.UDPCrawlerPingHandler;
import com.limegroup.gnutella.messages.MessageFactory;
@@ -95,8 +95,8 @@
import com.limegroup.gnutella.uploader.HTTPHeaderUtils;
import com.limegroup.gnutella.uploader.HttpRequestHandlerFactory;
import com.limegroup.gnutella.uploader.UploadSlotManager;
-import com.limegroup.gnutella.version.UpdateCollectionFactory;
-import com.limegroup.gnutella.version.UpdateHandler;
+//import com.limegroup.gnutella.version.UpdateCollectionFactory;
+//import com.limegroup.gnutella.version.UpdateHandler;
import com.limegroup.gnutella.xml.LimeXMLDocumentFactory;
import com.limegroup.gnutella.xml.LimeXMLDocumentHelper;
import com.limegroup.gnutella.xml.LimeXMLProperties;
@@ -182,6 +182,7 @@
return injector.getInstance(HTTPHeaderUtils.class);
}
+ /*
public TrackerFactory getTrackerFactory() {
return injector.getInstance(TrackerFactory.class);
}
@@ -197,6 +198,7 @@
public ManagedTorrentFactory getManagedTorrentFactory() {
return injector.getInstance(ManagedTorrentFactory.class);
}
+ */
public PushEndpointFactory getPushEndpointFactory() {
return injector.getInstance(PushEndpointFactory.class);
@@ -274,6 +276,7 @@
return injector.getInstance(Key.get(ConnectionDispatcher.class, Names.named("global")));
}
+ /*
public LocalAcceptor getLocalAcceptor() {
return injector.getInstance(LocalAcceptor.class);
}
@@ -281,6 +284,7 @@
public LocalHTTPAcceptor getLocalHTTPAcceptor() {
return injector.getInstance(LocalHTTPAcceptor.class);
}
+ */
public HostCatcher getHostCatcher() {
return injector.getInstance(HostCatcher.class);
@@ -390,6 +394,7 @@
return injector.getInstance(MulticastService.class);
}
+ /*
public ChatManager getChatManager() {
return injector.getInstance(ChatManager.class);
}
@@ -401,6 +406,7 @@
public IncomingConnectionHandler getIncomingConnectionHandler() {
return injector.getInstance(IncomingConnectionHandler.class);
}
+ */
public ConnectionWatchdog getConnectionWatchdog() {
return injector.getInstance(ConnectionWatchdog.class);
@@ -442,9 +448,11 @@
return injector.getInstance(SpamManager.class);
}
+ /*
public UpdateHandler getUpdateHandler() {
return injector.getInstance(UpdateHandler.class);
}
+ */
public LimeXMLProperties getLimeXMLProperties() {
return injector.getInstance(LimeXMLProperties.class);
@@ -478,9 +486,11 @@
return injector.getInstance(RUDPContext.class);
}
+ /*
public BTContextFactory getBTContextFactory() {
return injector.getInstance(BTContextFactory.class);
}
+ */
public ActivityCallback getActivityCallback() {
return injector.getInstance(ActivityCallback.class);
@@ -522,9 +532,11 @@
return injector.getInstance(ConnectionCheckerManager.class);
}
+ /*
public ExternalControl getExternalControl() {
return injector.getInstance(ExternalControl.class);
}
+ */
public NIODispatcher getNIODispatcher() {
return injector.getInstance(NIODispatcher.class);
@@ -638,6 +650,7 @@
return injector.getInstance(MetaDataReader.class);
}
+ /*
public InstantMessengerFactory getInstantMessengerFactory() {
return injector.getInstance(InstantMessengerFactory.class);
}
@@ -645,6 +658,7 @@
public BTUploaderFactory getBTUploaderFactory() {
return injector.getInstance(BTUploaderFactory.class);
}
+ */
public PingRequestFactory getPingRequestFactory() {
return injector.getInstance(PingRequestFactory.class);
@@ -654,9 +668,11 @@
return injector.getInstance(IpPortContentAuthorityFactory.class);
}
+ /*
public UpdateCollectionFactory getUpdateCollectionFactory() {
return injector.getInstance(UpdateCollectionFactory.class);
}
+ */
public LimeCoreGlue getLimeCoreGlue() {
return injector.getInstance(LimeCoreGlue.class);
@@ -666,9 +682,11 @@
return injector.getInstance(LicenseVerifier.class);
}
+ /*
public LWSManager getLWSManger() {
return injector.getInstance(LWSManager.class);
}
+ */
public DiskController getDiskController() {
return injector.getInstance(DiskController.class);
@@ -690,6 +708,7 @@
return injector.getInstance(NetworkInstanceUtils.class);
}
+ /*
public DHTPeerPublisher getDHTPeerPublisher() {
return injector.getInstance(DHTPeerPublisher.class);
}
@@ -713,4 +732,5 @@
public CachedGeoLocation getCachedGeoLocation() {
return injector.getInstance(CachedGeoLocation.class);
}
+ */
}
Index: com/limegroup/gnutella/LimeWireCoreModule.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/LimeWireCoreModule.java,v
retrieving revision 1.115
diff -u -r1.115 LimeWireCoreModule.java
--- com/limegroup/gnutella/LimeWireCoreModule.java 22 May 2008 23:13:49 -0000 1.115
+++ com/limegroup/gnutella/LimeWireCoreModule.java 3 Feb 2010 12:07:58 -0000
@@ -21,7 +21,7 @@
import org.limewire.net.LimeWireNetModule;
import org.limewire.nio.ByteBufferCache;
import org.limewire.nio.NIODispatcher;
-import org.limewire.promotion.LimeWirePromotionModule;
+//import org.limewire.promotion.LimeWirePromotionModule;
import org.limewire.security.SecureMessageVerifier;
import org.limewire.security.SecureMessageVerifierImpl;
import org.limewire.security.SecurityToken;
@@ -35,40 +35,40 @@
import com.google.inject.Singleton;
import com.google.inject.TypeLiteral;
import com.google.inject.name.Names;
-import com.limegroup.bittorrent.BTConnectionFactory;
-import com.limegroup.bittorrent.BTConnectionFactoryImpl;
-import com.limegroup.bittorrent.BTContextFactory;
-import com.limegroup.bittorrent.BTContextFactoryImpl;
-import com.limegroup.bittorrent.BTMetaInfoFactory;
-import com.limegroup.bittorrent.BTMetaInfoFactoryImpl;
-import com.limegroup.bittorrent.BTUploaderFactory;
-import com.limegroup.bittorrent.BTUploaderFactoryImpl;
-import com.limegroup.bittorrent.ManagedTorrentFactory;
-import com.limegroup.bittorrent.ManagedTorrentFactoryImpl;
-import com.limegroup.bittorrent.TorrentEvent;
-import com.limegroup.bittorrent.TorrentEventListener;
-import com.limegroup.bittorrent.TorrentManager;
-import com.limegroup.bittorrent.TorrentManagerImpl;
-import com.limegroup.bittorrent.choking.ChokerFactory;
-import com.limegroup.bittorrent.choking.ChokerFactoryImpl;
-import com.limegroup.bittorrent.dht.DHTPeerLocator;
-import com.limegroup.bittorrent.dht.DHTPeerLocatorImpl;
-import com.limegroup.bittorrent.dht.DHTPeerPublisher;
-import com.limegroup.bittorrent.dht.DHTPeerPublisherImpl;
-import com.limegroup.bittorrent.handshaking.BTConnectionFetcherFactory;
-import com.limegroup.bittorrent.handshaking.BTConnectionFetcherFactoryImpl;
-import com.limegroup.bittorrent.tracking.TrackerFactory;
-import com.limegroup.bittorrent.tracking.TrackerFactoryImpl;
-import com.limegroup.bittorrent.tracking.TrackerManagerFactory;
-import com.limegroup.bittorrent.tracking.TrackerManagerFactoryImpl;
+//import com.limegroup.bittorrent.BTConnectionFactory;
+//import com.limegroup.bittorrent.BTConnectionFactoryImpl;
+//import com.limegroup.bittorrent.BTContextFactory;
+//import com.limegroup.bittorrent.BTContextFactoryImpl;
+//import com.limegroup.bittorrent.BTMetaInfoFactory;
+//import com.limegroup.bittorrent.BTMetaInfoFactoryImpl;
+//import com.limegroup.bittorrent.BTUploaderFactory;
+//import com.limegroup.bittorrent.BTUploaderFactoryImpl;
+//import com.limegroup.bittorrent.ManagedTorrentFactory;
+//import com.limegroup.bittorrent.ManagedTorrentFactoryImpl;
+//import com.limegroup.bittorrent.TorrentEvent;
+//import com.limegroup.bittorrent.TorrentEventListener;
+//import com.limegroup.bittorrent.TorrentManager;
+//import com.limegroup.bittorrent.TorrentManagerImpl;
+//import com.limegroup.bittorrent.choking.ChokerFactory;
+//import com.limegroup.bittorrent.choking.ChokerFactoryImpl;
+//import com.limegroup.bittorrent.dht.DHTPeerLocator;
+//import com.limegroup.bittorrent.dht.DHTPeerLocatorImpl;
+//import com.limegroup.bittorrent.dht.DHTPeerPublisher;
+//import com.limegroup.bittorrent.dht.DHTPeerPublisherImpl;
+//import com.limegroup.bittorrent.handshaking.BTConnectionFetcherFactory;
+//import com.limegroup.bittorrent.handshaking.BTConnectionFetcherFactoryImpl;
+//import com.limegroup.bittorrent.tracking.TrackerFactory;
+//import com.limegroup.bittorrent.tracking.TrackerFactoryImpl;
+//import com.limegroup.bittorrent.tracking.TrackerManagerFactory;
+//import com.limegroup.bittorrent.tracking.TrackerManagerFactoryImpl;
import com.limegroup.gnutella.altlocs.AlternateLocationFactory;
import com.limegroup.gnutella.altlocs.AlternateLocationFactoryImpl;
import com.limegroup.gnutella.auth.IpPortContentAuthorityFactory;
import com.limegroup.gnutella.auth.IpPortContentAuthorityFactoryImpl;
import com.limegroup.gnutella.bootstrap.UDPHostCacheFactory;
import com.limegroup.gnutella.bootstrap.UDPHostCacheFactoryImpl;
-import com.limegroup.gnutella.chat.InstantMessengerFactory;
-import com.limegroup.gnutella.chat.InstantMessengerFactoryImpl;
+//import com.limegroup.gnutella.chat.InstantMessengerFactory;
+//import com.limegroup.gnutella.chat.InstantMessengerFactoryImpl;
import com.limegroup.gnutella.connection.ConnectionBandwidthStatistics;
import com.limegroup.gnutella.connection.ConnectionBandwidthStatisticsImpl;
import com.limegroup.gnutella.connection.ConnectionCapabilities;
@@ -98,14 +98,14 @@
import com.limegroup.gnutella.dht.db.PushProxiesValueFactory;
import com.limegroup.gnutella.dht.db.PushProxiesValueFactoryImpl;
import com.limegroup.gnutella.dht.io.LimeMessageDispatcherFactoryImpl;
-import com.limegroup.gnutella.downloader.LWSIntegrationServicesDelegate;
+//import com.limegroup.gnutella.downloader.LWSIntegrationServicesDelegate;
import com.limegroup.gnutella.downloader.LimeWireDownloadModule;
import com.limegroup.gnutella.filters.HostileFilter;
import com.limegroup.gnutella.filters.IPFilter;
import com.limegroup.gnutella.filters.LocalIPFilter;
import com.limegroup.gnutella.filters.SpamFilterFactory;
import com.limegroup.gnutella.filters.SpamFilterFactoryImpl;
-import com.limegroup.gnutella.geocode.LimeWireGeocodeGlueModule;
+//import com.limegroup.gnutella.geocode.LimeWireGeocodeGlueModule;
import com.limegroup.gnutella.handshaking.HandshakeResponderFactory;
import com.limegroup.gnutella.handshaking.HandshakeResponderFactoryImpl;
import com.limegroup.gnutella.handshaking.HandshakeServices;
@@ -116,8 +116,8 @@
import com.limegroup.gnutella.http.HttpExecutor;
import com.limegroup.gnutella.licenses.LicenseFactory;
import com.limegroup.gnutella.licenses.LicenseFactoryImpl;
-import com.limegroup.gnutella.lws.server.LWSManager;
-import com.limegroup.gnutella.lws.server.LWSManagerImpl;
+//import com.limegroup.gnutella.lws.server.LWSManager;
+//import com.limegroup.gnutella.lws.server.LWSManagerImpl;
import com.limegroup.gnutella.messagehandlers.MessageHandlerBinderImpl;
import com.limegroup.gnutella.messages.LocalPongInfo;
import com.limegroup.gnutella.messages.LocalPongInfoImpl;
@@ -172,12 +172,12 @@
import com.limegroup.gnutella.util.EventDispatcher;
import com.limegroup.gnutella.util.FECUtils;
import com.limegroup.gnutella.util.FECUtilsImpl;
-import com.limegroup.gnutella.version.UpdateCollectionFactory;
-import com.limegroup.gnutella.version.UpdateCollectionFactoryImpl;
-import com.limegroup.gnutella.version.UpdateHandler;
-import com.limegroup.gnutella.version.UpdateHandlerImpl;
-import com.limegroup.gnutella.version.UpdateMessageVerifier;
-import com.limegroup.gnutella.version.UpdateMessageVerifierImpl;
+//import com.limegroup.gnutella.version.UpdateCollectionFactory;
+//import com.limegroup.gnutella.version.UpdateCollectionFactoryImpl;
+//import com.limegroup.gnutella.version.UpdateHandler;
+//import com.limegroup.gnutella.version.UpdateHandlerImpl;
+//import com.limegroup.gnutella.version.UpdateMessageVerifier;
+//import com.limegroup.gnutella.version.UpdateMessageVerifierImpl;
import com.limegroup.gnutella.xml.LimeXMLDocumentFactory;
import com.limegroup.gnutella.xml.LimeXMLDocumentFactoryImpl;
import com.limegroup.gnutella.xml.LimeXMLReplyCollectionFactory;
@@ -218,9 +218,11 @@
binder().install(new LimeWireIOModule());
binder().install(new LimeWireMojitoModule());
binder().install(new LimeWireSecurityCertificateModule());
+ /*
binder().install(new LimeWireGeocodeGlueModule());
binder().install(new LimeWirePromotionModule(PromotionBinderRequestorImpl.class,
PromotionServicesImpl.class));
+ */
binder().install(new LimeWireSimppModule());
bind(LimeWireCore.class);
@@ -238,9 +240,11 @@
bind(HandshakeResponderFactory.class).to(HandshakeResponderFactoryImpl.class);
bind(HeadersFactory.class).to(HeadersFactoryImpl.class);
bind(PushEndpointFactory.class).to(PushEndpointFactoryImpl.class);
+ /*
bind(ManagedTorrentFactory.class).to(ManagedTorrentFactoryImpl.class);
bind(TrackerManagerFactory.class).to(TrackerManagerFactoryImpl.class);
bind(TrackerFactory.class).to(TrackerFactoryImpl.class);
+ */
bind(HeadPongFactory.class).to(HeadPongFactoryImpl.class);
bind(UploadManager.class).to(HTTPUploadManager.class);
bind(HTTPUploadSessionManager.class).to(HTTPUploadManager.class);
@@ -258,7 +262,7 @@
bind(QueryReplyFactory.class).to(QueryReplyFactoryImpl.class);
bind(MessageDispatcherFactory.class).to(LimeMessageDispatcherFactoryImpl.class);
bind(CapabilitiesVMFactory.class).to(CapabilitiesVMFactoryImpl.class);
- bind(BTContextFactory.class).to(BTContextFactoryImpl.class);
+ //bind(BTContextFactory.class).to(BTContextFactoryImpl.class);
bind(LifecycleManager.class).to(LifecycleManagerImpl.class);
bind(LocalPongInfo.class).to(LocalPongInfoImpl.class);
bind(ConnectionServices.class).to(ConnectionServicesImpl.class);
@@ -269,14 +273,16 @@
bind(SpamServices.class).to(SpamServicesImpl.class);
bind(SpamFilterFactory.class).to(SpamFilterFactoryImpl.class);
bind(DHTControllerFacade.class).to(DHTControllerFacadeImpl.class);
+ /*
bind(ChokerFactory.class).to(ChokerFactoryImpl.class);
bind(BTConnectionFetcherFactory.class).to(BTConnectionFetcherFactoryImpl.class);
+ */
bind(ConnectionCheckerManager.class).to(ConnectionCheckerManagerImpl.class);
bind(DHTBootstrapperFactory.class).to(DHTBootstrapperFactoryImpl.class);
bind(DHTNodeFetcherFactory.class).to(DHTNodeFetcherFactoryImpl.class);
bind(UDPReplyHandlerFactory.class).to(UDPReplyHandlerFactoryImpl.class);
bind(UDPReplyHandlerCache.class).to(UDPReplyHandlerCacheImpl.class);
- bind(BTConnectionFactory.class).to(BTConnectionFactoryImpl.class);
+ //bind(BTConnectionFactory.class).to(BTConnectionFactoryImpl.class);
bind(SocketProcessor.class).to(AcceptorImpl.class);
bind(DownloadManager.class).to(DownloadManagerImpl.class).asEagerSingleton();
bind(BrowseHostHandlerManagerImpl.class).asEagerSingleton();
@@ -297,12 +303,12 @@
bind(LicenseFactory.class).to(LicenseFactoryImpl.class);
bind(LimeXMLDocumentFactory.class).to(LimeXMLDocumentFactoryImpl.class);
bind(MetaDataFactory.class).to(MetaDataFactoryImpl.class);
- bind(InstantMessengerFactory.class).to(InstantMessengerFactoryImpl.class);
+ //bind(InstantMessengerFactory.class).to(InstantMessengerFactoryImpl.class);
bind(SaveLocationManager.class).to(DownloadManager.class);
- bind(BTUploaderFactory.class).to(BTUploaderFactoryImpl.class);
+ //bind(BTUploaderFactory.class).to(BTUploaderFactoryImpl.class);
bind(PingRequestFactory.class).to(PingRequestFactoryImpl.class);
bind(IpPortContentAuthorityFactory.class).to(IpPortContentAuthorityFactoryImpl.class);
- bind(UpdateCollectionFactory.class).to(UpdateCollectionFactoryImpl.class);
+ //bind(UpdateCollectionFactory.class).to(UpdateCollectionFactoryImpl.class);
bind(ConnectionDispatcher.class).annotatedWith(Names.named("global")).to(ConnectionDispatcherImpl.class).in(Scopes.SINGLETON);
bind(ConnectionDispatcher.class).annotatedWith(Names.named("local")).to(ConnectionDispatcherImpl.class).in(Scopes.SINGLETON);
bind(UDPPinger.class).to(UDPPingerImpl.class);
@@ -310,8 +316,10 @@
bind(Inspector.class).to(InspectorImpl.class);
bind(ConnectionCapabilities.class).to(ConnectionCapabilitiesImpl.class);
bind(ConnectionBandwidthStatistics.class).to(ConnectionBandwidthStatisticsImpl.class);
+ /*
bind(LWSManager.class).to(LWSManagerImpl.class);
bind(LWSIntegrationServicesDelegate.class).to(DownloadManager.class);
+ */
bind(LocalSocketAddressProvider.class).to(LocalSocketAddressProviderImpl.class);
bind(SettingsProvider.class).to(MacCalculatorSettingsProviderImpl.class);
bind(ReplyHandler.class).annotatedWith(Names.named("forMeReplyHandler")).to(ForMeReplyHandler.class);
@@ -319,8 +327,10 @@
bind(IPFilter.class).to(LocalIPFilter.class);
bind(IPFilter.class).annotatedWith(Names.named("hostileFilter")).to(HostileFilter.class);
bind(UploadSlotManager.class).to(UploadSlotManagerImpl.class);
+ /*
bind(new TypeLiteral<EventDispatcher<TorrentEvent, TorrentEventListener>>(){}).to(TorrentManager.class);
bind(TorrentManager.class).to(TorrentManagerImpl.class);
+ */
bind(BandwidthManager.class).to(BandwidthManagerImpl.class);
bind(SecureMessageVerifier.class).toProvider(SecureMessageVerifierProvider.class);
bind(SecureMessageVerifier.class).annotatedWith(Names.named("inspection")).toProvider(InspectionVerifierProvider.class);
@@ -334,16 +344,18 @@
bind(ConnectionManager.class).to(ConnectionManagerImpl.class);
bind(MessageHandlerBinder.class).to(MessageHandlerBinderImpl.class);
bind(QueryDispatcher.class).to(QueryDispatcherImpl.class);
+ /*
bind(DHTPeerPublisher.class).to(DHTPeerPublisherImpl.class);
bind(DHTPeerLocator.class).to(DHTPeerLocatorImpl.class);
+ */
bind(Acceptor.class).to(AcceptorImpl.class);
- bind(UpdateHandler.class).to(UpdateHandlerImpl.class);
+ //bind(UpdateHandler.class).to(UpdateHandlerImpl.class);
bind(SecurityToken.TokenProvider.class).to(SecurityToken.AddressSecurityTokenProvider.class);
- bind(UpdateMessageVerifier.class).to(UpdateMessageVerifierImpl.class);
+ //bind(UpdateMessageVerifier.class).to(UpdateMessageVerifierImpl.class);
bind(InspectionResponseFactory.class).to(InspectionResponseFactoryImpl.class);
bind(FECUtils.class).to(FECUtilsImpl.class);
bind(NodeAssigner.class).to(NodeAssignerImpl.class);
- bind(BTMetaInfoFactory.class).to(BTMetaInfoFactoryImpl.class);
+ //bind(BTMetaInfoFactory.class).to(BTMetaInfoFactoryImpl.class);
bindAll(Names.named("unlimitedExecutor"), ExecutorService.class, UnlimitedExecutorProvider.class, Executor.class);
bindAll(Names.named("backgroundExecutor"), ScheduledExecutorService.class, BackgroundTimerProvider.class, ExecutorService.class, Executor.class);
Index: com/limegroup/gnutella/MessageRouterImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/MessageRouterImpl.java,v
retrieving revision 1.49.2.1
diff -u -r1.49.2.1 MessageRouterImpl.java
--- com/limegroup/gnutella/MessageRouterImpl.java 12 Sep 2008 15:31:55 -0000 1.49.2.1
+++ com/limegroup/gnutella/MessageRouterImpl.java 3 Feb 2010 12:08:00 -0000
@@ -115,7 +115,7 @@
import com.limegroup.gnutella.settings.SearchSettings;
import com.limegroup.gnutella.simpp.SimppManager;
import com.limegroup.gnutella.util.LimeWireUtils;
-import com.limegroup.gnutella.version.UpdateHandler;
+//import com.limegroup.gnutella.version.UpdateHandler;
/**
@@ -318,7 +318,7 @@
protected final ScheduledExecutorService backgroundExecutor;
protected final Provider<PongCacher> pongCacher;
protected final Provider<SimppManager> simppManager;
- protected final Provider<UpdateHandler> updateHandler;
+ //protected final Provider<UpdateHandler> updateHandler;
protected final UDPReplyHandlerCache udpReplyHandlerCache;
protected final GuidMap multicastGuidMap;
private final Provider<InspectionRequestHandler> inspectionRequestHandlerFactory;
@@ -369,7 +369,7 @@
@Named("backgroundExecutor") ScheduledExecutorService backgroundExecutor,
Provider<PongCacher> pongCacher,
Provider<SimppManager> simppManager,
- Provider<UpdateHandler> updateHandler,
+ //Provider<UpdateHandler> updateHandler,
GuidMapManager guidMapManager,
UDPReplyHandlerCache udpReplyHandlerCache,
Provider<InspectionRequestHandler> inspectionRequestHandlerFactory,
@@ -406,7 +406,7 @@
this.backgroundExecutor = backgroundExecutor;
this.pongCacher = pongCacher;
this.simppManager = simppManager;
- this.updateHandler = updateHandler;
+ //this.updateHandler = updateHandler;
this.udpCrawlerPingHandlerFactory = udpCrawlerPingHandlerFactory;
this.pingRequestFactory = pingRequestFactory;
this.messageHandlerBinder = messageHandlerBinder;
@@ -571,8 +571,10 @@
setMessageHandler(HeadPing.class, new HeadPingHandler());
setMessageHandler(SimppRequestVM.class, new SimppRequestVMHandler());
setMessageHandler(SimppVM.class, new SimppVMHandler());
+ /*
setMessageHandler(UpdateRequest.class, new UpdateRequestHandler());
setMessageHandler(UpdateResponse.class, new UpdateResponseHandler());
+ */
setMessageHandler(HeadPong.class, new HeadPongHandler());
setMessageHandler(DHTContactsMessage.class, new DHTContactsMessageHandler());
setMessageHandler(VendorMessage.class, new VendorMessageHandler());
@@ -588,7 +590,7 @@
setUDPMessageHandler(ReplyNumberVendorMessage.class, oobHandler);
setUDPMessageHandler(UDPCrawlerPing.class, udpCrawlerPingHandlerFactory.get());
setUDPMessageHandler(HeadPing.class, new UDPHeadPingHandler());
- setUDPMessageHandler(UpdateRequest.class, new UDPUpdateRequestHandler());
+ //setUDPMessageHandler(UpdateRequest.class, new UDPUpdateRequestHandler());
setUDPMessageHandler(ContentResponse.class, new UDPContentResponseHandler());
setUDPMessageHandler(InspectionRequest.class, inspectionHandler);
@@ -1804,7 +1806,8 @@
// only send to at most 4 Ultrapeers, as we could have more
// as a result of race conditions - also, don't send what is new
// requests down too many connections
- final int max = qr.isWhatIsNewRequest() ? 2 : 3;
+// final int max = qr.isWhatIsNewRequest() ? 2 : 3;
+ final int max = qr.isWhatIsNewRequest() ? 2 : 4;
int start = !qr.isWhatIsNewRequest() ? 0 :
(int) (Math.floor(Math.random()*(list.size()-1)));
int limit = Math.min(max, list.size());
@@ -2097,6 +2100,7 @@
/**
* Handles an update request by sending a response.
*/
+ /*
private void handleUpdateRequest(UpdateRequest req, ReplyHandler handler ) {
byte[] data = req.isOldRequest() ? updateHandler.get().getOldUpdateResponse() :
updateHandler.get().getLatestBytes();
@@ -2105,15 +2109,18 @@
handler.reply(msg);
}
}
+ */
/**
* Passes the request onto the update manager.
*/
+ /*
private void handleUpdateResponse(UpdateResponse resp, ReplyHandler handler) {
if(resp.isNewVersion()) {
updateHandler.get().handleNewData(resp.getUpdate(), handler);
}
}
+ */
/** Handles a ContentResponse msg -- passing it to the ContentManager. */
private void handleContentResponse(ContentResponse msg, ReplyHandler handler) {
@@ -2984,6 +2991,7 @@
}
}
+ /*
private class UpdateRequestHandler implements MessageHandler {
public void handleMessage(Message msg, InetSocketAddress addr, ReplyHandler handler) {
handleUpdateRequest((UpdateRequest)msg, handler);
@@ -2995,6 +3003,7 @@
handleUpdateResponse((UpdateResponse)msg, handler);
}
}
+ */
private class HeadPongHandler implements MessageHandler {
public void handleMessage(Message msg, InetSocketAddress addr, ReplyHandler handler) {
@@ -3056,11 +3065,13 @@
}
}
+ /*
private class UDPUpdateRequestHandler implements MessageHandler {
public void handleMessage(Message msg, InetSocketAddress addr, ReplyHandler handler) {
handleUpdateRequest((UpdateRequest)msg, handler);
}
}
+ */
private class UDPContentResponseHandler implements MessageHandler {
public void handleMessage(Message msg, InetSocketAddress addr, ReplyHandler handler) {
Index: com/limegroup/gnutella/ResponseImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/ResponseImpl.java,v
retrieving revision 1.2
diff -u -r1.2 ResponseImpl.java
--- com/limegroup/gnutella/ResponseImpl.java 28 Apr 2008 22:23:24 -0000 1.2
+++ com/limegroup/gnutella/ResponseImpl.java 3 Feb 2010 12:08:00 -0000
@@ -13,6 +13,7 @@
import org.limewire.io.IpPort;
import org.limewire.service.ErrorService;
import org.limewire.util.ByteUtils;
+import org.limewire.util.I18NConvert;
import com.limegroup.gnutella.downloader.RemoteFileDescFactory;
import com.limegroup.gnutella.search.HostData;
@@ -126,7 +127,8 @@
if (name == null)
this.name = "";
else
- this.name = name;
+// this.name = name;
+ this.name = I18NConvert.instance().compose(name);
isMetaFile = this.name.toLowerCase(Locale.US).endsWith(".torrent");
Index: com/limegroup/gnutella/ResponseVerifierImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/ResponseVerifierImpl.java,v
retrieving revision 1.2
diff -u -r1.2 ResponseVerifierImpl.java
--- com/limegroup/gnutella/ResponseVerifierImpl.java 28 Apr 2008 18:44:58 -0000 1.2
+++ com/limegroup/gnutella/ResponseVerifierImpl.java 3 Feb 2010 12:08:00 -0000
@@ -55,7 +55,8 @@
/**
* A mapping from GUIDs to the words of the search made with that GUID.
*/
- private ForgetfulHashMap<GUID, RequestData> mapper = new ForgetfulHashMap<GUID, RequestData>(15);
+// private ForgetfulHashMap<GUID, RequestData> mapper = new ForgetfulHashMap<GUID, RequestData>(15);
+ private ForgetfulHashMap<GUID, RequestData> mapper = new ForgetfulHashMap<GUID, RequestData>(100);
/** The characters to use in stripping apart queries. */
private static final String DELIMITERS="+ ";
/** The size of a Mandragore worm response, i.e., 8KB. */
Index: com/limegroup/gnutella/SpeedConstants.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/Attic/SpeedConstants.java,v
retrieving revision 1.7
diff -u -r1.7 SpeedConstants.java
--- com/limegroup/gnutella/SpeedConstants.java 8 Oct 2007 19:48:10 -0000 1.7
+++ com/limegroup/gnutella/SpeedConstants.java 3 Feb 2010 12:08:00 -0000
@@ -25,9 +25,12 @@
public static final int MIN_SPEED_INT = 0;
public static final int MAX_SPEED_INT = 20000;
- public static final int MODEM_SWARM = 2;
- public static final int T1_SWARM = 8;
- public static final int T3_SWARM = 10;
+// public static final int MODEM_SWARM = 2;
+ public static final int MODEM_SWARM = 4;
+// public static final int T1_SWARM = 8;
+ public static final int T1_SWARM = 10;
+// public static final int T3_SWARM = 10;
+ public static final int T3_SWARM = 14;
Index: com/limegroup/gnutella/StandardMessageRouter.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/StandardMessageRouter.java,v
retrieving revision 1.168
diff -u -r1.168 StandardMessageRouter.java
--- com/limegroup/gnutella/StandardMessageRouter.java 2 Apr 2008 21:18:33 -0000 1.168
+++ com/limegroup/gnutella/StandardMessageRouter.java 3 Feb 2010 12:08:00 -0000
@@ -60,7 +60,7 @@
import com.limegroup.gnutella.settings.MessageSettings;
import com.limegroup.gnutella.simpp.SimppManager;
import com.limegroup.gnutella.util.DataUtils;
-import com.limegroup.gnutella.version.UpdateHandler;
+//import com.limegroup.gnutella.version.UpdateHandler;
import com.limegroup.gnutella.xml.LimeXMLDocumentHelper;
import com.limegroup.gnutella.xml.LimeXMLUtils;
@@ -106,7 +106,7 @@
ScheduledExecutorService backgroundExecutor,
Provider<PongCacher> pongCacher,
Provider<SimppManager> simppManager,
- Provider<UpdateHandler> updateHandler,
+ //Provider<UpdateHandler> updateHandler,
GuidMapManager guidMapManager,
UDPReplyHandlerCache udpReplyHandlerCache,
Provider<InspectionRequestHandler> inspectionRequestHandlerFactory,
@@ -125,7 +125,10 @@
socketsManager, hostCatcher, queryReplyFactory, staticMessages,
messageDispatcher, multicastService, queryDispatcher,
activityCallback, connectionServices, applicationServices,
+ /* cabos
backgroundExecutor, pongCacher, simppManager, updateHandler,
+ */
+ backgroundExecutor, pongCacher, simppManager,
guidMapManager, udpReplyHandlerCache, inspectionRequestHandlerFactory,
udpCrawlerPingHandlerFactory,
pingRequestFactory, messageHandlerBinder, oobHandlerFactory,
@@ -348,9 +351,10 @@
List<Response> filtered = new ArrayList<Response>(responses.length);
for(Response r : responses) {
+ /*
if (r.isMetaFile() &&
fileManager.isFileApplicationShared(r.getName()))
- filtered.add(r);
+ */
}
if (filtered.isEmpty()) {// nothing to send..
Index: com/limegroup/gnutella/UploadManager.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/UploadManager.java,v
retrieving revision 1.212
diff -u -r1.212 UploadManager.java
--- com/limegroup/gnutella/UploadManager.java 5 Sep 2007 18:58:58 -0000 1.212
+++ com/limegroup/gnutella/UploadManager.java 3 Feb 2010 12:08:00 -0000
@@ -1,6 +1,7 @@
package com.limegroup.gnutella;
import java.net.InetAddress;
+import java.util.Iterator;
import org.apache.http.protocol.HttpRequestHandler;
@@ -74,4 +75,6 @@
*/
void stop();
+ /* cabos */
+ Iterator getUploads();
}
Index: com/limegroup/gnutella/UploadServicesImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/UploadServicesImpl.java,v
retrieving revision 1.1
diff -u -r1.1 UploadServicesImpl.java
--- com/limegroup/gnutella/UploadServicesImpl.java 8 Aug 2007 22:37:25 -0000 1.1
+++ com/limegroup/gnutella/UploadServicesImpl.java 3 Feb 2010 12:08:00 -0000
@@ -3,7 +3,7 @@
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
-import com.limegroup.bittorrent.TorrentManager;
+//import com.limegroup.bittorrent.TorrentManager;
import com.limegroup.gnutella.settings.ConnectionSettings;
import com.limegroup.gnutella.settings.UploadSettings;
import com.limegroup.gnutella.uploader.UploadSlotManager;
@@ -14,17 +14,20 @@
private final Provider<UploadManager> uploadManager;
private final Provider<UploadSlotManager> uploadSlotManager;
private final Provider<ConnectionManager> connectionManager;
- private final Provider<TorrentManager> torrentManager;
+ //private final Provider<TorrentManager> torrentManager;
@Inject
public UploadServicesImpl(Provider<UploadManager> uploadManager,
Provider<UploadSlotManager> uploadSlotManager,
+ /* cabos
Provider<ConnectionManager> connectionManager,
Provider<TorrentManager> torrentManager) {
+ */
+ Provider<ConnectionManager> connectionManager) {
this.uploadManager = uploadManager;
this.uploadSlotManager = uploadSlotManager;
this.connectionManager = connectionManager;
- this.torrentManager = torrentManager;
+ //this.torrentManager = torrentManager;
}
@@ -73,7 +76,10 @@
* @see com.limegroup.gnutella.UploadServices#getNumUploads()
*/
public int getNumUploads() {
+ /* cabos
return uploadManager.get().uploadsInProgress() + torrentManager.get().getNumActiveTorrents();
+ */
+ return uploadManager.get().uploadsInProgress();
}
/* (non-Javadoc)
Index: com/limegroup/gnutella/altlocs/DownloaderGuidAlternateLocationFinder.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/altlocs/DownloaderGuidAlternateLocationFinder.java,v
retrieving revision 1.2
diff -u -r1.2 DownloaderGuidAlternateLocationFinder.java
--- com/limegroup/gnutella/altlocs/DownloaderGuidAlternateLocationFinder.java 15 Apr 2008 02:16:29 -0000 1.2
+++ com/limegroup/gnutella/altlocs/DownloaderGuidAlternateLocationFinder.java 3 Feb 2010 12:08:00 -0000
@@ -16,12 +16,12 @@
import com.limegroup.gnutella.PushEndpoint;
import com.limegroup.gnutella.URN;
import com.limegroup.gnutella.Downloader.DownloadStatus;
-import com.limegroup.gnutella.browser.MagnetOptions;
+//import com.limegroup.gnutella.browser.MagnetOptions;
import com.limegroup.gnutella.dht.db.PushEndpointService;
import com.limegroup.gnutella.dht.db.SearchListener;
import com.limegroup.gnutella.downloader.CoreDownloader;
import com.limegroup.gnutella.downloader.DownloadStatusEvent;
-import com.limegroup.gnutella.downloader.MagnetDownloader;
+//import com.limegroup.gnutella.downloader.MagnetDownloader;
/**
* Listens for {@link DownloadManagerEvent} and registers itself as an event listener
@@ -69,22 +69,27 @@
}
switch (event.getType()) {
case ADDED:
+ /*
CoreDownloader downloader = event.getSource();
if (downloader instanceof MagnetDownloader) {
MagnetDownloader magnetDownloader = (MagnetDownloader)downloader;
// subscribe for status events so we can search when waiting for user
magnetDownloader.addListener(downloadStatusListener);
}
+ */
break;
case REMOVED:
+ /*
downloader = event.getSource();
if (downloader instanceof MagnetDownloader) {
downloader.removeListener(downloadStatusListener);
}
+ */
break;
}
}
+ /*
private long getSize(MagnetDownloader downloader) {
long size = downloader.getMagnet().getFileSize();
if (size == -1) {
@@ -107,16 +112,19 @@
}
searchForPushEndpoints(sha1Urn, magnet.getGUIDUrns());
}
+ */
void handleStatusEvent(DownloadStatusEvent event) {
switch (event.getType()) {
case GAVE_UP:
case WAITING_FOR_USER:
+ /*
CoreDownloader downloader = event.getSource();
if (downloader instanceof MagnetDownloader) {
MagnetDownloader magnetDownloader = (MagnetDownloader)downloader;
searchForPushEndpoints(magnetDownloader);
}
+ */
}
}
Index: com/limegroup/gnutella/bootstrap/TcpBootstrap.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/bootstrap/TcpBootstrap.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 TcpBootstrap.java
--- com/limegroup/gnutella/bootstrap/TcpBootstrap.java 12 Sep 2008 20:33:21 -0000 1.1.2.1
+++ com/limegroup/gnutella/bootstrap/TcpBootstrap.java 3 Feb 2010 12:08:00 -0000
@@ -252,6 +252,24 @@
public void loadDefaults() {
// ADD DEFAULT HOST CACHES HERE.
+ add(URI.create("http://drei.gtkg.net:8080/gwc/"));
+ add(URI.create("http://ein.gtkg.net:8080/gwc/"));
+ add(URI.create("http://gnutelladev1.udp-host-cache.com:8080/gwc/"));
+ add(URI.create("http://gnutelladev2.udp-host-cache.com:8080/gwc/"));
+ add(URI.create("http://grantgalitz.com/Beacon/gwc.php"));
+ add(URI.create("http://gwc.ak-electron.eu:12050/"));
+ add(URI.create("http://gwc.frodoslair.net/beacon/gwc.php"));
+ add(URI.create("http://gwc.lame.net/gwcii.php"));
+ add(URI.create("http://gweb.4octets.co.uk/skulls.php"));
+ add(URI.create("http://hub.dynoisp.com/skulls/skulls.php"));
+ add(URI.create("http://leet.gtkg.org:8080/gwc/"));
+ add(URI.create("http://leite4.uni.cc/gwc.php"));
+ add(URI.create("http://secondary.udp-host-cache.com:8080/gwc/"));
+ add(URI.create("http://sissy.gtkg.org:8080/gwc/"));
+ add(URI.create("http://tertiary.udp-host-cache.com:8080/gwc/"));
+ add(URI.create("http://www.delelisten.no/gwc5/gwc.php"));
+ add(URI.create("http://www.myfoxy.net/gwc/cgi-bin/fc"));
+ add(URI.create("http://zwei.gtkg.net:8080/gwc/"));
}
public static interface TcpBootstrapListener {
Index: com/limegroup/gnutella/bootstrap/UDPHostCache.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/bootstrap/UDPHostCache.java,v
retrieving revision 1.25.30.1
diff -u -r1.25.30.1 UDPHostCache.java
--- com/limegroup/gnutella/bootstrap/UDPHostCache.java 11 Sep 2008 18:46:44 -0000 1.25.30.1
+++ com/limegroup/gnutella/bootstrap/UDPHostCache.java 3 Feb 2010 12:08:01 -0000
@@ -296,7 +296,18 @@
public void loadDefaults() {
// ADD DEFAULT UDP HOST CACHES HERE.
- }
+ /* cabos */
+ createAndAdd("drei.gtkg.net", 62666);
+ createAndAdd("ein.gtkg.net", 60666);
+ createAndAdd("leet.gtkg.org", 1337);
+ createAndAdd("secondary.udp-host-cache.com", 9999);
+ createAndAdd("sissy.gtkg.org", 51557);
+ createAndAdd("tertiary.udp-host-cache.com", 9999);
+ createAndAdd("uhc.udp-host-cache.com", 9999);
+ createAndAdd("uhc2.limewire.com", 20181);
+ createAndAdd("uhc3.limewire.com", 51180);
+ createAndAdd("zwei.gtkg.net", 61666);
+ }
/**
* Creates and adds a host/port as a UDP host cache.
Index: com/limegroup/gnutella/connection/GnutellaConnection.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/connection/GnutellaConnection.java,v
retrieving revision 1.38.4.1
diff -u -r1.38.4.1 GnutellaConnection.java
--- com/limegroup/gnutella/connection/GnutellaConnection.java 12 Sep 2008 15:31:55 -0000 1.38.4.1
+++ com/limegroup/gnutella/connection/GnutellaConnection.java 3 Feb 2010 12:08:02 -0000
@@ -99,7 +99,7 @@
import com.limegroup.gnutella.statistics.OutOfBandStatistics;
import com.limegroup.gnutella.util.DataUtils;
import com.limegroup.gnutella.util.LimeWireUtils;
-import com.limegroup.gnutella.version.UpdateHandler;
+//import com.limegroup.gnutella.version.UpdateHandler;
/**
* A Connection managed by a ConnectionManager.
@@ -300,7 +300,7 @@
private final Provider<SimppManager> simppManager;
- private final Provider<UpdateHandler> updateHandler;
+ //private final Provider<UpdateHandler> updateHandler;
private final Provider<ConnectionServices> connectionServices;
@@ -345,7 +345,10 @@
SearchResultHandler searchResultHandler, CapabilitiesVMFactory capabilitiesVMFactory,
SocketsManager socketsManager, Acceptor acceptor,
MessagesSupportedVendorMessage supportedVendorMessage,
+ /* cabos
Provider<SimppManager> simppManager, Provider<UpdateHandler> updateHandler,
+ */
+ Provider<SimppManager> simppManager,
Provider<ConnectionServices> connectionServices, GuidMapManager guidMapManager,
SpamFilterFactory spamFilterFactory, MessageReaderFactory messageReaderFactory,
MessageFactory messageFactory, ApplicationServices applicationServices,
@@ -363,7 +366,7 @@
this.networkUpdateSanityChecker = networkUpdateSanityChecker;
this.searchResultHandler = searchResultHandler;
this.simppManager = simppManager;
- this.updateHandler = updateHandler;
+ //this.updateHandler = updateHandler;
this.connectionServices = connectionServices;
this.guidMapManager = guidMapManager;
this.messageReaderFactory = messageReaderFactory;
@@ -393,7 +396,10 @@
NetworkUpdateSanityChecker networkUpdateSanityChecker,
SearchResultHandler searchResultHandler, CapabilitiesVMFactory capabilitiesVMFactory,
Acceptor acceptor, MessagesSupportedVendorMessage supportedVendorMessage,
+ /* cabos
Provider<SimppManager> simppManager, Provider<UpdateHandler> updateHandler,
+ */
+ Provider<SimppManager> simppManager,
Provider<ConnectionServices> connectionServices, GuidMapManager guidMapManager,
SpamFilterFactory spamFilterFactory, MessageReaderFactory messageReaderFactory,
MessageFactory messageFactory, ApplicationServices applicationServices,
@@ -411,7 +417,7 @@
this.networkUpdateSanityChecker = networkUpdateSanityChecker;
this.searchResultHandler = searchResultHandler;
this.simppManager = simppManager;
- this.updateHandler = updateHandler;
+ //this.updateHandler = updateHandler;
this.connectionServices = connectionServices;
this.guidMapManager = guidMapManager;
this.messageReaderFactory = messageReaderFactory;
@@ -1152,6 +1158,7 @@
}
// see if there's a new update message.
+ /*
int latestId = updateHandler.get().getLatestId();
int currentId = capVM.supportsUpdate();
if (currentId != -1 && (!receivedCapVM || currentId > latestId)) {
@@ -1160,6 +1167,7 @@
} else if (currentId == latestId) {
updateHandler.get().handleUpdateAvailable(this, currentId);
}
+ */
receivedCapVM = true;
// fire a vendor event
Index: com/limegroup/gnutella/connection/RoutedConnectionFactoryImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/connection/RoutedConnectionFactoryImpl.java,v
retrieving revision 1.5
diff -u -r1.5 RoutedConnectionFactoryImpl.java
--- com/limegroup/gnutella/connection/RoutedConnectionFactoryImpl.java 9 Feb 2008 00:02:25 -0000 1.5
+++ com/limegroup/gnutella/connection/RoutedConnectionFactoryImpl.java 3 Feb 2010 12:08:02 -0000
@@ -29,7 +29,7 @@
import com.limegroup.gnutella.search.SearchResultHandler;
import com.limegroup.gnutella.simpp.SimppManager;
import com.limegroup.gnutella.statistics.OutOfBandStatistics;
-import com.limegroup.gnutella.version.UpdateHandler;
+//import com.limegroup.gnutella.version.UpdateHandler;
/**
* An implementation of {@link RoutedConnectionFactory} that constructs {@link GnutellaConnection GnutellaConnections}.
@@ -65,7 +65,7 @@
private final Provider<SimppManager> simppManager;
- private final Provider<UpdateHandler> updateHandler;
+ //private final Provider<UpdateHandler> updateHandler;
private final Provider<ConnectionServices> connectionServices;
@@ -94,7 +94,10 @@
Provider<SearchResultHandler> searchResultHandler,
CapabilitiesVMFactory capabilitiesVMFactory, Provider<SocketsManager> socketsManager,
Provider<Acceptor> acceptor, MessagesSupportedVendorMessage supportedVendorMessage,
+ /* cabos
Provider<SimppManager> simppManager, Provider<UpdateHandler> updateHandler,
+ */
+ Provider<SimppManager> simppManager,
Provider<ConnectionServices> connectionServices, GuidMapManager guidMapManager,
SpamFilterFactory spamFilterFactory, MessageFactory messageFactory,
MessageReaderFactory messageReaderFactory, ApplicationServices applicationServices,
@@ -115,7 +118,7 @@
this.acceptor = acceptor;
this.supportedVendorMessage = supportedVendorMessage;
this.simppManager = simppManager;
- this.updateHandler = updateHandler;
+ //this.updateHandler = updateHandler;
this.connectionServices = connectionServices;
this.guidMapManager = guidMapManager;
this.spamFilterFactory = spamFilterFactory;
@@ -135,7 +138,10 @@
queryRequestFactory, headersFactory, handshakeResponderFactory, queryReplyFactory,
messageDispatcher.get(), networkUpdateSanityChecker.get(), searchResultHandler
.get(), capabilitiesVMFactory, socketsManager.get(), acceptor.get(),
+ /* cabos
supportedVendorMessage, simppManager, updateHandler, connectionServices,
+ */
+ supportedVendorMessage, simppManager, connectionServices,
guidMapManager, spamFilterFactory, messageReaderFactory, messageFactory,
applicationServices, secureMessageVerifier.get(), outOfBandStatistics, networkInstanceUtils);
}
@@ -145,7 +151,10 @@
queryRequestFactory, headersFactory, handshakeResponderFactory, queryReplyFactory,
messageDispatcher.get(), networkUpdateSanityChecker.get(), searchResultHandler
.get(), capabilitiesVMFactory, acceptor.get(), supportedVendorMessage,
+ /* cabos
simppManager, updateHandler, connectionServices, guidMapManager, spamFilterFactory,
+ */
+ simppManager, connectionServices, guidMapManager, spamFilterFactory,
messageReaderFactory, messageFactory, applicationServices, secureMessageVerifier
.get(), outOfBandStatistics, networkInstanceUtils);
}
Index: com/limegroup/gnutella/downloader/CoreDownloaderFactory.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/downloader/CoreDownloaderFactory.java,v
retrieving revision 1.3
diff -u -r1.3 CoreDownloaderFactory.java
--- com/limegroup/gnutella/downloader/CoreDownloaderFactory.java 11 Mar 2008 17:19:18 -0000 1.3
+++ com/limegroup/gnutella/downloader/CoreDownloaderFactory.java 3 Feb 2010 12:08:02 -0000
@@ -4,14 +4,14 @@
import org.limewire.io.InvalidDataException;
-import com.limegroup.bittorrent.BTDownloader;
-import com.limegroup.bittorrent.BTMetaInfo;
+//import com.limegroup.bittorrent.BTDownloader;
+//import com.limegroup.bittorrent.BTMetaInfo;
import com.limegroup.gnutella.GUID;
import com.limegroup.gnutella.RemoteFileDesc;
import com.limegroup.gnutella.SaveLocationException;
-import com.limegroup.gnutella.browser.MagnetOptions;
+//import com.limegroup.gnutella.browser.MagnetOptions;
import com.limegroup.gnutella.downloader.serial.DownloadMemento;
-import com.limegroup.gnutella.version.DownloadInformation;
+//import com.limegroup.gnutella.version.DownloadInformation;
/**
* Constructs all kinds of {@link CoreDownloader CoreDownloaders}.<p>
@@ -25,11 +25,13 @@
GUID originalQueryGUID, File saveDirectory, String fileName, boolean overwrite)
throws SaveLocationException;
+ /*
public MagnetDownloader createMagnetDownloader(MagnetOptions magnet, boolean overwrite,
File saveDir, String fileName) throws SaveLocationException;
public InNetworkDownloader createInNetworkDownloader(DownloadInformation info, File dir,
long startTime) throws SaveLocationException;
+ */
public ResumeDownloader createResumeDownloader(File incompleteFile, String name, long size)
throws SaveLocationException;
@@ -43,10 +45,12 @@
* @return StoreDownloader to begin downloading from
* @throws SaveLocationException when the new file location could not be set
*/
+ /*
public StoreDownloader createStoreDownloader(RemoteFileDesc rfd, File saveDirectory,
String fileName, boolean overwrite) throws SaveLocationException;
public BTDownloader createBTDownloader(BTMetaInfo info);
+ */
/**
* Creates the appropriate kind of downloader from a given DownloadMemento.
Index: com/limegroup/gnutella/downloader/CoreDownloaderFactoryImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/downloader/CoreDownloaderFactoryImpl.java,v
retrieving revision 1.2
diff -u -r1.2 CoreDownloaderFactoryImpl.java
--- com/limegroup/gnutella/downloader/CoreDownloaderFactoryImpl.java 22 Jan 2008 18:53:41 -0000 1.2
+++ com/limegroup/gnutella/downloader/CoreDownloaderFactoryImpl.java 3 Feb 2010 12:08:02 -0000
@@ -9,43 +9,54 @@
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
-import com.limegroup.bittorrent.BTDownloader;
-import com.limegroup.bittorrent.BTMetaInfo;
+//import com.limegroup.bittorrent.BTDownloader;
+//import com.limegroup.bittorrent.BTMetaInfo;
import com.limegroup.gnutella.GUID;
import com.limegroup.gnutella.RemoteFileDesc;
import com.limegroup.gnutella.SaveLocationException;
-import com.limegroup.gnutella.browser.MagnetOptions;
+//import com.limegroup.gnutella.browser.MagnetOptions;
import com.limegroup.gnutella.downloader.serial.DownloadMemento;
-import com.limegroup.gnutella.version.DownloadInformation;
+//import com.limegroup.gnutella.version.DownloadInformation;
@Singleton
public class CoreDownloaderFactoryImpl implements CoreDownloaderFactory {
private final Provider<ManagedDownloader> managedDownloaderFactory;
+ /*
private final Provider<MagnetDownloader> magnetDownloaderFactory;
private final Provider<InNetworkDownloader> inNetworkDownloaderFactory;
+ */
private final Provider<ResumeDownloader> resumeDownloaderFactory;
+ /*
private final Provider<StoreDownloader> storeDownloaderFactory;
private final Provider<BTDownloader> btDownloaderFactory;
+ */
@Inject
public CoreDownloaderFactoryImpl(Provider<ManagedDownloader> managedDownloaderFactory,
+ /* cabos
Provider<MagnetDownloader> magnetDownloaderFactory,
Provider<InNetworkDownloader> inNetworkDownloaderFactory,
Provider<ResumeDownloader> resumeDownloaderFactory,
Provider<StoreDownloader> storeDownloaderFactory,
Provider<BTDownloader> btDownloaderFactory) {
+ */
+ Provider<ResumeDownloader> resumeDownloaderFactory) {
this.managedDownloaderFactory = managedDownloaderFactory;
+ /*
this.magnetDownloaderFactory = magnetDownloaderFactory;
this.inNetworkDownloaderFactory = inNetworkDownloaderFactory;
+ */
this.resumeDownloaderFactory = resumeDownloaderFactory;
+ /*
this.storeDownloaderFactory = storeDownloaderFactory;
this.btDownloaderFactory = btDownloaderFactory;
+ */
}
public ManagedDownloader createManagedDownloader(RemoteFileDesc[] files,
@@ -58,6 +69,7 @@
return md;
}
+ /*
public MagnetDownloader createMagnetDownloader(MagnetOptions magnet, boolean overwrite,
File saveDirectory, String fileName) throws SaveLocationException {
if (!magnet.isDownloadable())
@@ -80,6 +92,7 @@
id.initDownloadInformation(info, startTime);
return id;
}
+ */
public ResumeDownloader createResumeDownloader(File incompleteFile, String name, long size)
throws SaveLocationException {
@@ -90,6 +103,7 @@
return rd;
}
+ /*
public StoreDownloader createStoreDownloader(RemoteFileDesc rfd, File saveDirectory,
String fileName, boolean overwrite) throws SaveLocationException {
StoreDownloader sd = storeDownloaderFactory.get();
@@ -103,6 +117,7 @@
bd.initBtMetaInfo(info);
return bd;
}
+ */
public CoreDownloader createFromMemento(DownloadMemento memento) throws InvalidDataException {
try {
@@ -118,17 +133,21 @@
private Provider<? extends CoreDownloader> providerForMemento(DownloadMemento memento)
throws InvalidDataException {
switch (memento.getDownloadType()) {
+ /*
case BTDOWNLOADER:
return btDownloaderFactory;
case INNETWORK:
return inNetworkDownloaderFactory;
case MAGNET:
return magnetDownloaderFactory;
+ */
case MANAGED:
return managedDownloaderFactory;
+ /*
case STORE:
return storeDownloaderFactory;
case TORRENTFETCHER:
+ */
default:
throw new InvalidDataException("invalid memento type: " + memento.getDownloadType());
}
Index: com/limegroup/gnutella/downloader/DownloadWorker.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/downloader/DownloadWorker.java,v
retrieving revision 1.91
diff -u -r1.91 DownloadWorker.java
--- com/limegroup/gnutella/downloader/DownloadWorker.java 28 Apr 2008 18:44:58 -0000 1.91
+++ com/limegroup/gnutella/downloader/DownloadWorker.java 3 Feb 2010 12:08:03 -0000
@@ -1574,7 +1574,10 @@
public void handleConnect(Socket socket) {
// LOG.debug(_rfd + " -- Handling connect from PushConnector");
HTTPDownloader dl = httpDownloaderFactory.create(socket, _rfd, _commonOutFile,
+ /* cabos
_manager instanceof InNetworkDownloader);
+ */
+ false);
try {
dl.initializeTCP();
statsTracker.successfulPushConnect();
@@ -1656,7 +1659,10 @@
this.connectingSocket = null;
HTTPDownloader dl = httpDownloaderFactory.create(socket, _rfd, _commonOutFile,
+ /* cabos
_manager instanceof InNetworkDownloader);
+ */
+ false);
try {
dl.initializeTCP(); // already connected, timeout doesn't
// matter.
Index: com/limegroup/gnutella/downloader/LWSIntegrationServicesImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/downloader/LWSIntegrationServicesImpl.java,v
retrieving revision 1.14
diff -u -r1.14 LWSIntegrationServicesImpl.java
--- com/limegroup/gnutella/downloader/LWSIntegrationServicesImpl.java 28 Apr 2008 18:44:59 -0000 1.14
+++ com/limegroup/gnutella/downloader/LWSIntegrationServicesImpl.java 3 Feb 2010 12:08:03 -0000
@@ -755,7 +755,10 @@
lwsIntegrationServicesDelegate.visitDownloads(new Visitor<CoreDownloader>() {
public boolean visit(CoreDownloader d) {
if (d == null) return true;
+ /* cabos
if (!(d instanceof StoreDownloader)) return true;
+ */
+ if (!(false)) return true;
String id = String.valueOf(System.identityHashCode(d));
if (!everActiveDownloaderIDs2Downloaders.containsKey(id)) {
everActiveDownloaderIDs2Downloaders.put(id, new HeavyWeightDownloaderInterface(d));
Index: com/limegroup/gnutella/downloader/LimeWireDownloadModule.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/downloader/LimeWireDownloadModule.java,v
retrieving revision 1.4
diff -u -r1.4 LimeWireDownloadModule.java
--- com/limegroup/gnutella/downloader/LimeWireDownloadModule.java 26 Mar 2008 15:21:08 -0000 1.4
+++ com/limegroup/gnutella/downloader/LimeWireDownloadModule.java 3 Feb 2010 12:08:03 -0000
@@ -2,8 +2,8 @@
import com.google.inject.AbstractModule;
import com.google.inject.name.Names;
-import com.limegroup.bittorrent.BTDownloader;
-import com.limegroup.bittorrent.BTDownloaderImpl;
+//import com.limegroup.bittorrent.BTDownloader;
+//import com.limegroup.bittorrent.BTDownloaderImpl;
import com.limegroup.gnutella.DownloadCallback;
import com.limegroup.gnutella.downloader.serial.DownloadSerializeSettings;
import com.limegroup.gnutella.downloader.serial.DownloadSerializeSettingsImpl;
@@ -18,20 +18,24 @@
@Override
protected void configure() {
bind(ManagedDownloader.class).to(ManagedDownloaderImpl.class);
+ /*
bind(InNetworkDownloader.class).to(InNetworkDownloaderImpl.class);
bind(MagnetDownloader.class).to(MagnetDownloaderImpl.class);
+ */
bind(ResumeDownloader.class).to(ResumeDownloaderImpl.class);
+ /*
bind(StoreDownloader.class).to(StoreDownloaderImpl.class);
bind(BTDownloader.class).to(BTDownloaderImpl.class);
+ */
bind(RemoteFileDescFactory.class).to(RemoteFileDescFactoryImpl.class);
- bind(DownloadCallback.class).annotatedWith(Names.named("inNetwork")).to(InNetworkCallback.class);
+ //bind(DownloadCallback.class).annotatedWith(Names.named("inNetwork")).to(InNetworkCallback.class);
bind(DownloadWorkerFactory.class).to(DownloadWorkerFactoryImpl.class);
bind(HTTPDownloaderFactory.class).to(HTTPDownloaderFactoryImpl.class);
bind(RequeryManagerFactory.class).to(RequeryManagerFactoryImpl.class);
bind(PushedSocketHandlerRegistry.class).to(PushDownloadManager.class);
bind(CoreDownloaderFactory.class).to(CoreDownloaderFactoryImpl.class);
- bind(LWSIntegrationServices.class).to(LWSIntegrationServicesImpl.class);
+ //bind(LWSIntegrationServices.class).to(LWSIntegrationServicesImpl.class);
bind(DownloadSerializer.class).to(DownloadSerializerImpl.class);
bind(DownloadSerializeSettings.class).to(DownloadSerializeSettingsImpl.class);
bind(OldDownloadConverter.class).to(OldDownloadConverterImpl.class);
Index: com/limegroup/gnutella/downloader/ManagedDownloader.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/downloader/ManagedDownloader.java,v
retrieving revision 1.461
diff -u -r1.461 ManagedDownloader.java
--- com/limegroup/gnutella/downloader/ManagedDownloader.java 11 Mar 2008 17:19:18 -0000 1.461
+++ com/limegroup/gnutella/downloader/ManagedDownloader.java 3 Feb 2010 12:08:03 -0000
@@ -2,6 +2,7 @@
import java.net.Socket;
import java.util.Collection;
+import java.util.Iterator;
import com.limegroup.gnutella.GUID;
import com.limegroup.gnutella.RemoteFileDesc;
Index: com/limegroup/gnutella/downloader/ManagedDownloaderImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/downloader/ManagedDownloaderImpl.java,v
retrieving revision 1.19
diff -u -r1.19 ManagedDownloaderImpl.java
--- com/limegroup/gnutella/downloader/ManagedDownloaderImpl.java 14 May 2008 18:21:31 -0000 1.19
+++ com/limegroup/gnutella/downloader/ManagedDownloaderImpl.java 3 Feb 2010 12:08:05 -0000
@@ -3157,4 +3157,29 @@
protected SourceRanker getSourceRanker() {
return ranker;
}
+ /* cabos */
+ public synchronized String getActiveHostAddresses() {
+ StringBuffer buffer = new StringBuffer();
+ for (Iterator i = cachedRFDs.iterator(); i.hasNext(); ) {
+ RemoteFileDesc rfd = (RemoteFileDesc)i.next();
+ if (rfd.isBrowseHostEnabled()) {
+ buffer.append(rfd.getAddress());
+ buffer.append(":");
+ buffer.append(rfd.getPort());
+ buffer.append(",");
+ }
+ }
+ return buffer.toString();
+ }
+
+ private boolean canceled = false;
+
+ public boolean canceled() {
+ return canceled;
+ }
+
+ public void cancel() {
+ canceled = true;
+ stop();
+ }
}
Index: com/limegroup/gnutella/downloader/RemoteFileDescFactory.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/downloader/RemoteFileDescFactory.java,v
retrieving revision 1.6
diff -u -r1.6 RemoteFileDescFactory.java
--- com/limegroup/gnutella/downloader/RemoteFileDescFactory.java 4 Feb 2008 23:24:35 -0000 1.6
+++ com/limegroup/gnutella/downloader/RemoteFileDescFactory.java 3 Feb 2010 12:08:05 -0000
@@ -119,7 +119,9 @@
*
* <b>This method can block if the size is <= 0.</b>
*/
+ /*
public RemoteFileDesc createUrlRemoteFileDesc(URL url, String filename, URN urn, long size)
throws IOException, URISyntaxException, HttpException, InterruptedException;
+ */
}
Index: com/limegroup/gnutella/downloader/RemoteFileDescFactoryImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/downloader/RemoteFileDescFactoryImpl.java,v
retrieving revision 1.12
diff -u -r1.12 RemoteFileDescFactoryImpl.java
--- com/limegroup/gnutella/downloader/RemoteFileDescFactoryImpl.java 2 May 2008 20:07:31 -0000 1.12
+++ com/limegroup/gnutella/downloader/RemoteFileDescFactoryImpl.java 3 Feb 2010 12:08:05 -0000
@@ -30,7 +30,7 @@
import com.limegroup.gnutella.UrnSet;
import com.limegroup.gnutella.http.URIUtils;
import com.limegroup.gnutella.altlocs.AlternateLocation;
-import com.limegroup.gnutella.browser.MagnetOptions;
+//import com.limegroup.gnutella.browser.MagnetOptions;
import com.limegroup.gnutella.downloader.serial.RemoteHostMemento;
import com.limegroup.gnutella.util.DataUtils;
import com.limegroup.gnutella.util.LimeWireUtils;
@@ -187,6 +187,7 @@
return rfd;
}
+ /*
public RemoteFileDesc createUrlRemoteFileDesc(URL url, String filename, URN urn, long size)
throws IOException, URISyntaxException, HttpException, InterruptedException {
// Use the URL class to do a little parsing for us.
@@ -204,6 +205,7 @@
: MagnetOptions.extractFileName(uri), size <= 0 ? contentLength(uri) : size, urns,
url);
}
+ */
private long contentLength(URI uri) throws HttpException, IOException, InterruptedException {
HttpHead head = new HttpHead(uri);
Index: com/limegroup/gnutella/downloader/serial/conversion/DownloadConverterObjectInputStream.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/downloader/serial/conversion/DownloadConverterObjectInputStream.java,v
retrieving revision 1.5
diff -u -r1.5 DownloadConverterObjectInputStream.java
--- com/limegroup/gnutella/downloader/serial/conversion/DownloadConverterObjectInputStream.java 4 Feb 2008 23:17:06 -0000 1.5
+++ com/limegroup/gnutella/downloader/serial/conversion/DownloadConverterObjectInputStream.java 3 Feb 2010 12:08:06 -0000
@@ -47,11 +47,11 @@
private void addCommon() {
addLookup("com.limegroup.gnutella.downloader.AbstractDownloader", SerialRoot.class.getName());
addLookup("com.limegroup.gnutella.downloader.ManagedDownloader", SerialManagedDownloaderImpl.class.getName());
- addLookup("com.limegroup.gnutella.downloader.StoreDownloader", SerialStoreDownloader.class.getName());
+ //addLookup("com.limegroup.gnutella.downloader.StoreDownloader", SerialStoreDownloader.class.getName());
addLookup("com.limegroup.gnutella.downloader.RequeryDownloader", SerialRequeryDownloader.class.getName());
- addLookup("com.limegroup.gnutella.downloader.MagnetDownloader", SerialMagnetDownloader.class.getName());
- addLookup("com.limegroup.gnutella.downloader.InNetworkDownloader", SerialInNetworkDownloader.class.getName());
- addLookup("com.limegroup.bittorrent.BTDownloader", SerialBTDownloader.class.getName());
+ //addLookup("com.limegroup.gnutella.downloader.MagnetDownloader", SerialMagnetDownloader.class.getName());
+ //addLookup("com.limegroup.gnutella.downloader.InNetworkDownloader", SerialInNetworkDownloader.class.getName());
+ //addLookup("com.limegroup.bittorrent.BTDownloader", SerialBTDownloader.class.getName());
addLookup("com.limegroup.gnutella.downloader.IncompleteFileManager", SerialIncompleteFileManager.class.getName());
addLookup("com.limegroup.gnutella.downloader.URLRemoteFileDesc", SerialUrlRemoteFileDesc.class.getName());
addLookup("com.limegroup.gnutella.xml.LimeXMLDocument", SerialXml.class.getName());
@@ -59,9 +59,9 @@
addLookup("com.limegroup.gnutella.util.IntervalSet", IntervalSet.class.getName());
addLookup("com.limegroup.gnutella.BandwidthTrackerImpl", SerialBandwidthTrackerImpl.class.getName());
addLookup("org.apache.commons.httpclient.URI", SerialOldURI.class.getName());
- addLookup("com.limegroup.bittorrent.BTMetaInfo", SerialBTMetaInfo.class.getName());
- addLookup("com.limegroup.bittorrent.BTMetaInfo$SerialKeys", SerialBTMetaInfo.SerialKeys.class.getName());
- addLookup("com.limegroup.bittorrent.TorrentFileSystem", SerialTorrentFileSystem.class.getName());
+ //addLookup("com.limegroup.bittorrent.BTMetaInfo", SerialBTMetaInfo.class.getName());
+ //addLookup("com.limegroup.bittorrent.BTMetaInfo$SerialKeys", SerialBTMetaInfo.SerialKeys.class.getName());
+ //addLookup("com.limegroup.bittorrent.TorrentFileSystem", SerialTorrentFileSystem.class.getName());
addLookup("com.limegroup.bittorrent.disk.VerifyingFolder$SerialData", SerialDiskManagerData.class.getName());
}
Index: com/limegroup/gnutella/downloader/serial/conversion/OldDownloadConverterImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/downloader/serial/conversion/OldDownloadConverterImpl.java,v
retrieving revision 1.5
diff -u -r1.5 OldDownloadConverterImpl.java
--- com/limegroup/gnutella/downloader/serial/conversion/OldDownloadConverterImpl.java 30 Jan 2008 20:18:02 -0000 1.5
+++ com/limegroup/gnutella/downloader/serial/conversion/OldDownloadConverterImpl.java 3 Feb 2010 12:08:06 -0000
@@ -21,24 +21,24 @@
import org.limewire.util.CommonUtils;
import com.limegroup.gnutella.URN;
-import com.limegroup.gnutella.browser.MagnetOptions;
+//import com.limegroup.gnutella.browser.MagnetOptions;
import com.limegroup.gnutella.downloader.DownloaderType;
import com.limegroup.gnutella.downloader.FileNotFoundException;
-import com.limegroup.gnutella.downloader.serial.BTDiskManagerMemento;
-import com.limegroup.gnutella.downloader.serial.BTDiskManagerMementoImpl;
-import com.limegroup.gnutella.downloader.serial.BTDownloadMemento;
-import com.limegroup.gnutella.downloader.serial.BTDownloadMementoImpl;
-import com.limegroup.gnutella.downloader.serial.BTMetaInfoMemento;
-import com.limegroup.gnutella.downloader.serial.BTMetaInfoMementoImpl;
+//import com.limegroup.gnutella.downloader.serial.BTDiskManagerMemento;
+//import com.limegroup.gnutella.downloader.serial.BTDiskManagerMementoImpl;
+//import com.limegroup.gnutella.downloader.serial.BTDownloadMemento;
+//import com.limegroup.gnutella.downloader.serial.BTDownloadMementoImpl;
+//import com.limegroup.gnutella.downloader.serial.BTMetaInfoMemento;
+//import com.limegroup.gnutella.downloader.serial.BTMetaInfoMementoImpl;
import com.limegroup.gnutella.downloader.serial.DownloadMemento;
import com.limegroup.gnutella.downloader.serial.GnutellaDownloadMemento;
import com.limegroup.gnutella.downloader.serial.GnutellaDownloadMementoImpl;
-import com.limegroup.gnutella.downloader.serial.MagnetDownloadMemento;
-import com.limegroup.gnutella.downloader.serial.MagnetDownloadMementoImpl;
+//import com.limegroup.gnutella.downloader.serial.MagnetDownloadMemento;
+//import com.limegroup.gnutella.downloader.serial.MagnetDownloadMementoImpl;
import com.limegroup.gnutella.downloader.serial.OldDownloadConverter;
import com.limegroup.gnutella.downloader.serial.RemoteHostMemento;
-import com.limegroup.gnutella.downloader.serial.TorrentFileSystemMemento;
-import com.limegroup.gnutella.downloader.serial.TorrentFileSystemMementoImpl;
+//import com.limegroup.gnutella.downloader.serial.TorrentFileSystemMemento;
+//import com.limegroup.gnutella.downloader.serial.TorrentFileSystemMementoImpl;
import com.limegroup.gnutella.downloader.serial.conversion.DownloadConverterObjectInputStream.Version;
import com.limegroup.gnutella.settings.SharingSettings;
@@ -83,6 +83,7 @@
List<DownloadMemento> mementos = new ArrayList<DownloadMemento>(roots.size());
for(Object o : roots) {
+ /* cabos
if(o instanceof SerialBTDownloader)
addBTDownloader(mementos, (SerialBTDownloader)o, sifm);
else if(o instanceof SerialInNetworkDownloader)
@@ -90,11 +91,15 @@
else if(o instanceof SerialMagnetDownloader)
addMagnet(mementos, (SerialMagnetDownloader)o, sifm);
else if(o instanceof SerialResumeDownloader)
+ */
+ if(o instanceof SerialResumeDownloader)
addResume(mementos, (SerialResumeDownloader)o, sifm);
else if(o instanceof SerialRequeryDownloader)
; // ignore!
+ /*
else if(o instanceof SerialStoreDownloader)
addStore(mementos, (SerialStoreDownloader)o, sifm);
+ */
else if(o instanceof SerialManagedDownloader)
addManaged(mementos, (SerialManagedDownloader)o, sifm);
else
@@ -120,6 +125,7 @@
memento.setSaveFile((File)properties.get("saveFile"));
}
+ /*
private void addStore(List<DownloadMemento> mementos, SerialStoreDownloader o, SerialIncompleteFileManager sifm) {
File incompleteFile = getIncompleteFile(o, sifm);
List<Range> ranges = getRanges(incompleteFile, sifm);
@@ -128,6 +134,7 @@
addGnutellaProperties(memento, o.getProperties(), ranges, incompleteFile, o.getRemoteFileDescs());
mementos.add(memento);
}
+ */
private void addManaged(List<DownloadMemento> mementos, SerialManagedDownloader o, SerialIncompleteFileManager sifm) {
File incompleteFile = getIncompleteFile(o, sifm);
@@ -150,6 +157,7 @@
mementos.add(memento);
}
+ /*
private void addMagnet(List<DownloadMemento> mementos, SerialMagnetDownloader o, SerialIncompleteFileManager sifm) {
File incompleteFile = getIncompleteFile(o, sifm);
List<Range> ranges = getRanges(incompleteFile, sifm);
@@ -207,6 +215,7 @@
memento.setTotalSize(system.getTotalSize());
return memento;
}
+ */
private List<Range> getRanges(File incompleteFile, SerialIncompleteFileManager ifm) {
List<Range> ranges = ifm.getBlocks().get(incompleteFile);
@@ -257,9 +266,12 @@
private URN getSha1(SerialManagedDownloader download) {
URN sha1 = null;
+ /* cabos
if(download instanceof SerialMagnetDownloader)
sha1 = ((SerialMagnetDownloader)download).getUrn();
else if(download instanceof SerialResumeDownloader)
+ */
+ if(download instanceof SerialResumeDownloader)
sha1 = ((SerialResumeDownloader)download).getUrn();
if(sha1 != null && !sha1.isSHA1())
Index: com/limegroup/gnutella/filters/KeywordFilter.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/filters/KeywordFilter.java,v
retrieving revision 1.22
diff -u -r1.22 KeywordFilter.java
--- com/limegroup/gnutella/filters/KeywordFilter.java 10 Mar 2008 21:27:54 -0000 1.22
+++ com/limegroup/gnutella/filters/KeywordFilter.java 3 Feb 2010 12:08:06 -0000
@@ -73,6 +73,11 @@
disallow("vagina");
disallow("whore");
disallow("xxx");
+ /* cabos */
+ disallow("orgasm");
+ disallow("sexy");
+ disallow("fucking");
+ disallow("porno");
}
/**
Index: com/limegroup/gnutella/filters/LocalIPFilter.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/filters/LocalIPFilter.java,v
retrieving revision 1.6
diff -u -r1.6 LocalIPFilter.java
--- com/limegroup/gnutella/filters/LocalIPFilter.java 28 Apr 2008 18:44:59 -0000 1.6
+++ com/limegroup/gnutella/filters/LocalIPFilter.java 3 Feb 2010 12:08:06 -0000
@@ -54,6 +54,9 @@
this.ipLoader = ipLoader;
File hostiles = new File(CommonUtils.getUserSettingsDir(), "hostiles.txt");
+ /* cabos */
+ if (!hostiles.exists())
+ hostiles = new File(CommonUtils.getCurrentDirectory(), "hostiles.txt");
shouldLoadHostiles = hostiles.exists();
hostileNetworkFilter.refreshHosts();
@@ -103,6 +106,9 @@
LOG.debug("loading hostiles");
File hostiles = new File(CommonUtils.getUserSettingsDir(), "hostiles.txt");
+ /* cabos */
+ if (!hostiles.exists())
+ hostiles = new File(CommonUtils.getCurrentDirectory(), "hostiles.txt");
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(hostiles));
Index: com/limegroup/gnutella/library/SharingUtils.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/library/Attic/SharingUtils.java,v
retrieving revision 1.2
diff -u -r1.2 SharingUtils.java
--- com/limegroup/gnutella/library/SharingUtils.java 20 Mar 2008 15:22:48 -0000 1.2
+++ com/limegroup/gnutella/library/SharingUtils.java 3 Feb 2010 12:08:06 -0000
@@ -17,17 +17,18 @@
// TODO: refactor back into filemanger for test mocking... use instances.
/** Subdirectory that is always shared */
- public static final File PROGRAM_SHARE;
+ //public static final File PROGRAM_SHARE;
/** Subdirectory that also is always shared. */
- public static final File PREFERENCE_SHARE;
+ //public static final File PREFERENCE_SHARE;
/** Subdirectory used to share special application files */
- public static final File APPLICATION_SPECIAL_SHARE;
+ //public static final File APPLICATION_SPECIAL_SHARE;
+ /*
static {
File forceShare = new File(".", ".NetworkShare").getAbsoluteFile();
try {
@@ -50,6 +51,7 @@
} catch(IOException ignored) {}
APPLICATION_SPECIAL_SHARE = forceShare;
}
+ */
/**
* Returns true if this file is not too large, not too small,
@@ -117,29 +119,36 @@
/**
* Determines if this FileDesc is a network share.
*/
+ /*
public static boolean isForcedShare(FileDesc desc) {
return isForcedShare(desc.getFile());
}
+ */
/**
* Determines if this File is a network share.
*/
+ /*
public static boolean isForcedShare(File file) {
File parent = file.getParentFile();
return parent != null && isForcedShareDirectory(parent);
}
+ */
/**
* Determines if this File is an application special share.
*/
+ /*
public static boolean isApplicationSpecialShare(File file) {
File parent = file.getParentFile();
return parent != null && isApplicationSpecialShareDirectory(parent);
}
+ */
/**
* Determines if this File is a network shared directory.
*/
+ /*
public static boolean isForcedShareDirectory(File f) {
return f.equals(SharingUtils.PROGRAM_SHARE) || f.equals(SharingUtils.PREFERENCE_SHARE);
}
@@ -147,6 +156,7 @@
public static boolean isApplicationSpecialShareDirectory(File directory) {
return directory.equals(SharingUtils.APPLICATION_SPECIAL_SHARE);
}
+ */
/**
* Returns true if this folder should never be a shared or saved folder.
Index: com/limegroup/gnutella/messages/PingReplyImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/messages/PingReplyImpl.java,v
retrieving revision 1.9
diff -u -r1.9 PingReplyImpl.java
--- com/limegroup/gnutella/messages/PingReplyImpl.java 28 Apr 2008 18:44:59 -0000 1.9
+++ com/limegroup/gnutella/messages/PingReplyImpl.java 3 Feb 2010 12:08:07 -0000
@@ -26,6 +26,8 @@
import org.limewire.security.MACCalculatorRepositoryManager;
import org.limewire.util.ByteUtils;
+import phex.common.Ip2CountryDB;
+
import com.limegroup.gnutella.ExtendedEndpoint;
import com.limegroup.gnutella.dht.DHTManager.DHTMode;
import com.limegroup.gnutella.settings.ApplicationSettings;
@@ -196,7 +198,10 @@
boolean tlsCapable = false;
String locale /** def. val from settings? */
+ /* cabos
= ApplicationSettings.DEFAULT_LOCALE.getValue();
+ */
+ = Ip2CountryDB.getInstance().getIP2Language(IP.getHostAddress(), ApplicationSettings.DEFAULT_LOCALE.getValue());
int slots = -1; //-1 didn't get it.
InetAddress myIP=null;
int myPort=0;
Index: com/limegroup/gnutella/messages/vendor/CapabilitiesVMFactoryImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/messages/vendor/CapabilitiesVMFactoryImpl.java,v
retrieving revision 1.6
diff -u -r1.6 CapabilitiesVMFactoryImpl.java
--- com/limegroup/gnutella/messages/vendor/CapabilitiesVMFactoryImpl.java 28 Apr 2008 17:05:04 -0000 1.6
+++ com/limegroup/gnutella/messages/vendor/CapabilitiesVMFactoryImpl.java 3 Feb 2010 12:08:07 -0000
@@ -14,25 +14,25 @@
import com.limegroup.gnutella.messages.FeatureSearchData;
import com.limegroup.gnutella.settings.SSLSettings;
import com.limegroup.gnutella.simpp.SimppManager;
-import com.limegroup.gnutella.version.UpdateHandler;
+//import com.limegroup.gnutella.version.UpdateHandler;
@Singleton
public class CapabilitiesVMFactoryImpl implements CapabilitiesVMFactory {
private final Provider<DHTManager> dhtManager;
private final Provider<SimppManager> simppManager;
- private final Provider<UpdateHandler> updateHandler;
+ //private final Provider<UpdateHandler> updateHandler;
private final Provider<NetworkManager> networkManager;
private volatile CapabilitiesVM currentCapabilities;
@Inject
public CapabilitiesVMFactoryImpl(Provider<DHTManager> dhtManager,
Provider<SimppManager> simppManager,
- Provider<UpdateHandler> updateHandler,
+ //Provider<UpdateHandler> updateHandler,
Provider<NetworkManager> networkManager) {
this.dhtManager = dhtManager;
this.simppManager = simppManager;
- this.updateHandler = updateHandler;
+ //this.updateHandler = updateHandler;
this.networkManager = networkManager;
}
@@ -65,7 +65,7 @@
supported.put(CapabilitiesVM.FEATURE_SEARCH_BYTES, FeatureSearchData.FEATURE_SEARCH_MAX_SELECTOR);
supported.put(CapabilitiesVM.SIMPP_BYTES, simppManager.get().getVersion());
- supported.put(CapabilitiesVM.UPDATE_BYTES, updateHandler.get().getLatestId());
+ //supported.put(CapabilitiesVM.UPDATE_BYTES, updateHandler.get().getLatestId());
supported.put(CapabilitiesVM.INCOMING_TCP_BYTES, networkManager.get().acceptedIncomingConnection() ? 1 : 0);
supported.put(CapabilitiesVM.FWT_SUPPORT_BYTES, networkManager.get().supportsFWTVersion());
Index: com/limegroup/gnutella/search/QueryHandler.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/search/QueryHandler.java,v
retrieving revision 1.57
diff -u -r1.57 QueryHandler.java
--- com/limegroup/gnutella/search/QueryHandler.java 26 Oct 2007 20:27:10 -0000 1.57
+++ com/limegroup/gnutella/search/QueryHandler.java 3 Feb 2010 12:08:07 -0000
@@ -11,7 +11,8 @@
* The number of results to try to get if we're an Ultrapeer originating
* the query.
*/
- public static final int ULTRAPEER_RESULTS = 150;
+// public static final int ULTRAPEER_RESULTS = 150;
+ public static final int ULTRAPEER_RESULTS = 250;
/**
* Constant for the maximum number of milliseconds the entire query
Index: com/limegroup/gnutella/settings/ChatSettings.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/settings/Attic/ChatSettings.java,v
retrieving revision 1.3
diff -u -r1.3 ChatSettings.java
--- com/limegroup/gnutella/settings/ChatSettings.java 8 Jan 2007 19:05:05 -0000 1.3
+++ com/limegroup/gnutella/settings/ChatSettings.java 3 Feb 2010 12:08:07 -0000
@@ -14,5 +14,6 @@
* Sets whether or not chat should be enabled.
*/
public static final BooleanSetting CHAT_ENABLED =
- FACTORY.createBooleanSetting("CHAT_ENABLED", true);
+// FACTORY.createBooleanSetting("CHAT_ENABLED", true);
+ FACTORY.createBooleanSetting("CHAT_ENABLED", false);
}
\ No newline at end of file
Index: com/limegroup/gnutella/settings/ConnectionSettings.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/settings/Attic/ConnectionSettings.java,v
retrieving revision 1.80
diff -u -r1.80 ConnectionSettings.java
--- com/limegroup/gnutella/settings/ConnectionSettings.java 27 Mar 2008 18:15:18 -0000 1.80
+++ com/limegroup/gnutella/settings/ConnectionSettings.java 3 Feb 2010 12:08:07 -0000
@@ -282,8 +282,9 @@
* match the local locale
*/
public static final IntSetting NUM_LOCALE_PREF =
- FACTORY.createIntSetting("NUMBER_LOCALE_PREF", 2);
-
+// FACTORY.createIntSetting("NUMBER_LOCALE_PREF", 2);
+ FACTORY.createIntSetting("NUMBER_LOCALE_PREF", 3);
+
/**
* how many attempts to connect to a remote host must elapse
* before we start accepting non-LW vendors as UPs
Index: com/limegroup/gnutella/settings/FilterSettings.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/settings/Attic/FilterSettings.java,v
retrieving revision 1.20
diff -u -r1.20 FilterSettings.java
--- com/limegroup/gnutella/settings/FilterSettings.java 11 Dec 2007 05:14:09 -0000 1.20
+++ com/limegroup/gnutella/settings/FilterSettings.java 3 Feb 2010 12:08:07 -0000
@@ -48,8 +48,9 @@
* Sets whether or not search results of the wmv and asf types are banned.
*/
public static final BooleanSetting FILTER_WMV_ASF =
- FACTORY.createBooleanSetting("FILTER_WMV_ASF",true);
-
+// FACTORY.createBooleanSetting("FILTER_WMV_ASF",true);
+ FACTORY.createBooleanSetting("FILTER_WMV_ASF",false);
+
/**
* Sets whether or not duplicate search results are
* banned.
Index: com/limegroup/gnutella/settings/SearchSettings.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/settings/Attic/SearchSettings.java,v
retrieving revision 1.43.2.1
diff -u -r1.43.2.1 SearchSettings.java
--- com/limegroup/gnutella/settings/SearchSettings.java 4 Jun 2008 15:11:46 -0000 1.43.2.1
+++ com/limegroup/gnutella/settings/SearchSettings.java 3 Feb 2010 12:08:08 -0000
@@ -328,8 +328,9 @@
*/
// FIXME check min/max values
public static final FloatSetting FILTER_SPAM_RESULTS =
- FACTORY.createFloatSetting("FILTER_SPAM_RESULTS", 0.85f);
-
+// FACTORY.createFloatSetting("FILTER_SPAM_RESULTS", 0.85f);
+ FACTORY.createFloatSetting("FILTER_SPAM_RESULTS", 1.0f);
+
/**
* The minimum spam rating at which we stop counting results for
* dynamic querying. Meant to prevent very strict user settings
Index: com/limegroup/gnutella/settings/SharingSettings.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/settings/Attic/SharingSettings.java,v
retrieving revision 1.56
diff -u -r1.56 SharingSettings.java
--- com/limegroup/gnutella/settings/SharingSettings.java 21 Apr 2008 16:53:19 -0000 1.56
+++ com/limegroup/gnutella/settings/SharingSettings.java 3 Feb 2010 12:08:08 -0000
@@ -43,11 +43,13 @@
/**
* Default directory for songs purchased from LWS
*/
+ /*
public static final File DEFAULT_SAVE_LWS_DIR =
new File(LimeWireUtils.getLimeWireRootFolder(), "Store Purchased");
public static final String DEFAULT_LWS_FILENAME_TEMPLATE =
"<artist> - <album> - <track> - <title>";
+ */
/**
* Whether or not we're going to add an alternate for ourselves
@@ -66,17 +68,21 @@
/**
* Directory for saving songs purchased from LimeWire Store (LWS)
*/
+ /*
public static final FileSetting DIRECTORY_FOR_SAVING_LWS_FILES =
FACTORY.createFileSetting("DIRETORY_FOR_SAVING_LWS_FILES",
DEFAULT_SAVE_LWS_DIR).setAlwaysSave(true);
+ */
/**
* Template for substructure when saving songs purchased from LimeWire Store (LWS)
* The template allows purchased songs to be saved in a unique fashion,
* ie. LWS_dir/artist/album/songX.mp3
*/
+ /*
public static final StringSetting TEMPLATE_SUBDIRECTORY_LWS_FILES =
FACTORY.createStringSetting("TEMPLATE_FOR_SAVING_LWS_FILES","");
+ */
/**
* Template for file name structure when saving songs purchased from the LimeWire Store (LWS)
@@ -84,16 +90,19 @@
* songs meta data
* ie. artist - track # - title.mp3
*/
+ /*
public static final StringSetting TEMPLATE_FOR_NAMING_LWS_FILES =
FACTORY.createStringSetting("TEMPLATE_FOR_NAMING_LWS_FILES",DEFAULT_LWS_FILENAME_TEMPLATE);
+ */
/**
* The directory where incomplete files are stored (downloads in progress).
*/
public static final FileSetting INCOMPLETE_DIRECTORY =
FACTORY.createFileSetting("INCOMPLETE_DIRECTORY",
- (new File(DIRECTORY_FOR_SAVING_FILES.getValue().getParent(),
- "Incomplete")));
+// (new File(DIRECTORY_FOR_SAVING_FILES.getValue().getParent(),
+ (new File(DIRECTORY_FOR_SAVING_FILES.getValue(),
+ "Incomplete")));
/**
* A file with a snapshot of current downloading files.
@@ -156,8 +165,11 @@
if(!saveDir.mkdirs()) throw new IOException("could not create save dir");
}
+ /* cabos
String parentDir = saveDir.getParent();
File incDir = new File(parentDir, "Incomplete");
+ */
+ File incDir = new File(saveDir, "Incomplete");
if(!incDir.isDirectory()) {
if(!incDir.mkdirs()) throw new IOException("could not create incomplete dir");
}
@@ -248,6 +260,7 @@
* @throws <tt>NullPointerException</tt>
* If the "dir" parameter is null.
*/
+ /*
public static final void setSaveLWSDirectory(File storeDir) throws IOException {
if (storeDir == null)
throw new NullPointerException();
@@ -269,34 +282,41 @@
DIRECTORY_FOR_SAVING_LWS_FILES.setValue(storeDir);
}
+ */
/**
* @return directory of where to save songs purchased from LimeWire Store
*/
+ /*
public static final File getSaveLWSDirectory() {
final File f = DIRECTORY_FOR_SAVING_LWS_FILES.getValue();
if (!f.exists()) f.mkdirs();
return f;
}
+ */
/**
* Sets the template for creating sub directories of store files using metadata
* @param template the template that describes the sub directory structure
* @throws NullPointerException if template is null
*/
+ /*
public static final void setSubdirectoryLWSTemplate(String template) {
if(template == null)
throw new NullPointerException();
TEMPLATE_SUBDIRECTORY_LWS_FILES.setValue(template);
}
+ */
/**
* @return template of how to create subdirectories of store files
* If no subdirectory template is used, will return ""
*/
+ /*
public static final String getSubDirectoryLWSTemplate() {
return TEMPLATE_SUBDIRECTORY_LWS_FILES.getValue();
}
+ */
/**
* Sets the template for naming files purchased from the LWS
@@ -304,18 +324,22 @@
* be used to name a Store file
* @throws NullPointerException if template is null
*/
+ /*
public static final void setFileNameLWSTemplate(String template) {
if( template == null)
throw new NullPointerException();
TEMPLATE_FOR_NAMING_LWS_FILES.setValue(template);
}
+ */
/**
* @return template of how to name LWS files
*/
+ /*
public static final String getFileNameLWSTemplate() {
return TEMPLATE_FOR_NAMING_LWS_FILES.getValue();
}
+ */
/*********************************************************************/
Index: com/limegroup/gnutella/simpp/SimppManagerImpl.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/simpp/SimppManagerImpl.java,v
retrieving revision 1.5.4.1
diff -u -r1.5.4.1 SimppManagerImpl.java
--- com/limegroup/gnutella/simpp/SimppManagerImpl.java 12 Sep 2008 20:33:21 -0000 1.5.4.1
+++ com/limegroup/gnutella/simpp/SimppManagerImpl.java 3 Feb 2010 12:08:08 -0000
@@ -37,7 +37,7 @@
import com.limegroup.gnutella.http.HttpClientListener;
import com.limegroup.gnutella.http.HttpExecutor;
import com.limegroup.gnutella.settings.SimppSettingsManager;
-import com.limegroup.gnutella.settings.UpdateSettings;
+//import com.limegroup.gnutella.settings.UpdateSettings;
import com.limegroup.gnutella.util.LimeWireUtils;
/**
@@ -271,8 +271,11 @@
private void doHttpMaxFailover() {
long maxTimeAgo = clock.now() - silentPeriodForMaxHttpRequest;
+ /* cabos
if(!httpRequestControl.requestQueued(HttpRequestControl.RequestReason.MAX) &&
UpdateSettings.LAST_SIMPP_FAILOVER.getValue() < maxTimeAgo) {
+ */
+ if(!httpRequestControl.requestQueued(HttpRequestControl.RequestReason.MAX)) {
int rndDelay = RANDOM.nextInt(maxMaxHttpRequestDelay) + minMaxHttpRequestDelay;
final String rndUri = maxedUpdateList.get(RANDOM.nextInt(maxedUpdateList.size()));
LOG.debug("Scheduling http max failover in: " + rndDelay + ", to: " + rndUri);
@@ -322,7 +325,7 @@
LOG.debug("http request method succeeded");
// remember we made an attempt even if it didn't succeed
- UpdateSettings.LAST_SIMPP_FAILOVER.setValue(clock.now());
+ //UpdateSettings.LAST_SIMPP_FAILOVER.setValue(clock.now());
final byte[] inflated;
try {
if (response.getStatusLine().getStatusCode() < 200
@@ -362,7 +365,7 @@
public boolean requestFailed(HttpUriRequest request, HttpResponse response, IOException exc) {
LOG.warn("http failover failed",exc);
httpRequestControl.requestFinished();
- UpdateSettings.LAST_SIMPP_FAILOVER.setValue(clock.now());
+ //UpdateSettings.LAST_SIMPP_FAILOVER.setValue(clock.now());
httpExecutor.get().releaseResources(response);
// nothing we can do.
Index: com/limegroup/gnutella/spam/SpamManager.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/spam/SpamManager.java,v
retrieving revision 1.10
diff -u -r1.10 SpamManager.java
--- com/limegroup/gnutella/spam/SpamManager.java 14 Apr 2008 22:40:38 -0000 1.10
+++ com/limegroup/gnutella/spam/SpamManager.java 3 Feb 2010 12:08:08 -0000
@@ -8,6 +8,7 @@
import com.limegroup.gnutella.messages.QueryRequest;
import com.limegroup.gnutella.settings.SearchSettings;
import com.limegroup.gnutella.spam.Token.Rating;
+import com.limegroup.gnutella.xml.LimeXMLNames;
@Singleton
public class SpamManager {
@@ -30,7 +31,8 @@
* incomplete file... save the user the trouble of downloading it, if he has
* his spam filter enabled
*/
- private static final float INCOMPLETE_FILE_RATING = 0.2f;
+// private static final float INCOMPLETE_FILE_RATING = 0.2f;
+ private static final float INCOMPLETE_FILE_RATING = 0.f;
private final RatingTable ratingTable;
@@ -75,7 +77,7 @@
if (isIncompleteFile(rfd.getFileName().toLowerCase(Locale.US))) {
rating = 1 - (1 - rating) * INCOMPLETE_FILE_RATING;
}
-
+
// apply bayesian filter
rating = 1 - (1 - rating) * (1 - ratingTable.getRating(rfd));
rfd.setSpamRating(rating);
Index: com/limegroup/gnutella/uploader/AbstractUploader.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/uploader/AbstractUploader.java,v
retrieving revision 1.8
diff -u -r1.8 AbstractUploader.java
--- com/limegroup/gnutella/uploader/AbstractUploader.java 7 Feb 2008 19:50:38 -0000 1.8
+++ com/limegroup/gnutella/uploader/AbstractUploader.java 3 Feb 2010 12:08:09 -0000
@@ -72,12 +72,12 @@
/**
* True if this is a forcibly shared network file.
*/
- private boolean forcedShare = false;
+ //private boolean forcedShare = false;
/**
* True if this is an uploader with high priority.
*/
- private boolean priorityShare = false;
+ //private boolean priorityShare = false;
/** The descriptor of the file being uploaded. */
private FileDesc fileDesc;
@@ -128,9 +128,11 @@
if (LOG.isDebugEnabled())
LOG.debug("Setting file description for " + this + ": " + fd);
this.fileDesc = fd;
+ /*
this.forcedShare = SharingUtils.isForcedShare(fd);
this.priorityShare = SharingUtils
.isApplicationSpecialShare(fd.getFile());
+ */
this.index = fd.getIndex();
setFileSize(fd.getFileSize());
}
@@ -172,9 +174,11 @@
assert written >= 0;
if (written > 0 && tcpBandwidthStatistics != null) {
+ /*
if (isForcedShare())
tcpBandwidthStatistics.getStatistic(StatisticType.HTTP_BODY_INNETWORK_UPSTREAM).addData(written);
else
+ */
tcpBandwidthStatistics.getStatistic(StatisticType.HTTP_BODY_UPSTREAM).addData(written);
}
synchronized (bwLock) {
@@ -239,6 +243,7 @@
return userAgent;
}
+ /*
public boolean isForcedShare() {
return forcedShare;
}
@@ -246,6 +251,7 @@
public boolean isPriorityShare() {
return priorityShare;
}
+ */
/**
* Returns true, if this is this uploader represents the first request.
Index: com/limegroup/gnutella/uploader/FileRequestHandler.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/uploader/FileRequestHandler.java,v
retrieving revision 1.31
diff -u -r1.31 FileRequestHandler.java
--- com/limegroup/gnutella/uploader/FileRequestHandler.java 28 Apr 2008 18:44:59 -0000 1.31
+++ com/limegroup/gnutella/uploader/FileRequestHandler.java 3 Feb 2010 12:08:09 -0000
@@ -175,8 +175,11 @@
HttpContext context, FileRequest fileRequest, FileDesc fd) throws IOException,
HttpException {
// create uploader
+ /* cabos
UploadType type = (SharingUtils.isForcedShare(fd)) ? UploadType.FORCED_SHARE
: UploadType.SHARED_FILE;
+ */
+ UploadType type = UploadType.SHARED_FILE;
HTTPUploader uploader = sessionManager.getOrCreateUploader(request, context, type, fd
.getFileName());
uploader.setFileDesc(fd);
Index: com/limegroup/gnutella/util/LimeWireUtils.java
===================================================================
RCS file: /cvs/core/com/limegroup/gnutella/util/LimeWireUtils.java,v
retrieving revision 1.23
diff -u -r1.23 LimeWireUtils.java
--- com/limegroup/gnutella/util/LimeWireUtils.java 28 Apr 2008 17:08:55 -0000 1.23
+++ com/limegroup/gnutella/util/LimeWireUtils.java 3 Feb 2010 12:08:09 -0000
@@ -27,8 +27,9 @@
* Constant for the current version of LimeWire.
*/
@InspectablePrimitive("limewire version")
- private static final String LIMEWIRE_VERSION = "@version@";
-
+// private static final String LIMEWIRE_VERSION = "@version@";
+ private static final String LIMEWIRE_VERSION = "4.18.8";
+
/**
* The current revision of the BitTorrent protocol implementation.
* For an up-to-date mapping to LimeWire versions, check out
@@ -99,13 +100,15 @@
*/
private static final String HTTP_SERVER;
- private static final String LIMEWIRE_PREFS_DIR_NAME = ".limewire";
+// private static final String LIMEWIRE_PREFS_DIR_NAME = ".limewire";
+ private static final String LIMEWIRE_PREFS_DIR_NAME = ".cabos";
/**
* Variable for whether or not this is a PRO version of LimeWire.
*/
@InspectablePrimitive("pro")
- private static boolean _isPro = false;
+// private static boolean _isPro = false;
+ private static boolean _isPro = true;
/** Whether or not a temporary directory is in use. */
private static boolean temporaryDirectoryInUse;
@@ -119,6 +122,7 @@
* Initialize the settings statically.
*/
static {
+ /*
if(!LIMEWIRE_VERSION.endsWith("Pro")) {
HTTP_SERVER = "LimeWire/" + LIMEWIRE_VERSION;
}
@@ -127,6 +131,8 @@
substring(0, LIMEWIRE_VERSION.length()-4)+" (Pro)");
_isPro = true;
}
+ */
+ HTTP_SERVER = "LimeWire/" + LIMEWIRE_VERSION + " (Cabos/0.8.2)";
}
/** Returns true if we're a beta. */
@@ -385,7 +391,8 @@
String appdata = System.getProperty("LIMEWIRE_PREFS_DIR", SystemUtils.getSpecialPath(SpecialLocations.APPLICATION_DATA));
if (appdata != null && appdata.length() > 0) {
appdata = stripQuotes(appdata);
- File tempSettingsDir = new File(appdata, "LimeWire");
+// File tempSettingsDir = new File(appdata, "LimeWire");
+ File tempSettingsDir = new File(appdata, "Cabos");
if (tempSettingsDir.isDirectory() || !settingsDir.exists()) {
FileUtils.setWriteable(new File(appdata));
try {
@@ -396,7 +403,8 @@
}
}
} else if(OSUtils.isMacOSX()) {
- settingsDir = new File(CommonUtils.getUserHomeDir(), "Library/Preferences/LimeWire");
+// settingsDir = new File(CommonUtils.getUserHomeDir(), "Library/Preferences/LimeWire");
+ settingsDir = new File(CommonUtils.getUserHomeDir(), "Library/Application Support/Cabos");
}
return settingsDir;
@@ -468,8 +476,9 @@
if(root == null || "".equals(root))
root = CommonUtils.getUserHomeDir().getPath();
- return new File(root, "LimeWire");
- }
+// return new File(root, "LimeWire");
+ return new File(root, "Cabos");
+ }
}