|
From: <gr...@us...> - 2009-09-22 07:42:30
|
Revision: 4490
http://phex.svn.sourceforge.net/phex/?rev=4490&view=rev
Author: gregork
Date: 2009-09-22 07:42:24 +0000 (Tue, 22 Sep 2009)
Log Message:
-----------
Fix of SF ticket #2864041
and other minor things.
Modified Paths:
--------------
phex/trunk/src/main/java/phex/connection/ConnectionEngine.java
phex/trunk/src/main/java/phex/download/swarming/SWDownloadFile.java
phex/trunk/src/main/java/phex/gui/common/GUIRegistry.java
phex/trunk/src/main/java/phex/gui/common/statusbar/NodeStatusZone.java
phex/trunk/src/main/java/phex/msg/PongMsg.java
phex/trunk/src/main/resources/phex/resources/Lang.pot
phex/trunk/src/main/resources/phex/resources/Lang_en_US.po
Modified: phex/trunk/src/main/java/phex/connection/ConnectionEngine.java
===================================================================
--- phex/trunk/src/main/java/phex/connection/ConnectionEngine.java 2009-09-21 23:48:55 UTC (rev 4489)
+++ phex/trunk/src/main/java/phex/connection/ConnectionEngine.java 2009-09-22 07:42:24 UTC (rev 4490)
@@ -635,6 +635,10 @@
{
connectedHost.setGgepSupported( true );
}
+ else
+ {
+ connectedHost.setGgepSupported( false );
+ }
}
private void sendStringToHost( String str )
Modified: phex/trunk/src/main/java/phex/download/swarming/SWDownloadFile.java
===================================================================
--- phex/trunk/src/main/java/phex/download/swarming/SWDownloadFile.java 2009-09-21 23:48:55 UTC (rev 4489)
+++ phex/trunk/src/main/java/phex/download/swarming/SWDownloadFile.java 2009-09-22 07:42:24 UTC (rev 4490)
@@ -706,10 +706,16 @@
int pos;
synchronized( candidatesLock )
{
- if ( allCandidatesList.contains( candidate ) )
+ int idx = allCandidatesList.indexOf( candidate );
+ if ( idx != -1 )
{
- //NLogger.debug( NLoggerNames.DOWNLOAD,
- // "Duplicate download candidate" );
+ // update push proxies of known candidates
+ DestAddress[] pushProxies = candidate.getPushProxyAddresses();
+ if ( pushProxies.length > 0 )
+ {
+ allCandidatesList.get( idx ).setPushProxyAddresses(
+ pushProxies );
+ }
return false;
}
logger.debug( "Adding download candidate {}", candidate );
Modified: phex/trunk/src/main/java/phex/gui/common/GUIRegistry.java
===================================================================
--- phex/trunk/src/main/java/phex/gui/common/GUIRegistry.java 2009-09-21 23:48:55 UTC (rev 4489)
+++ phex/trunk/src/main/java/phex/gui/common/GUIRegistry.java 2009-09-22 07:42:24 UTC (rev 4490)
@@ -81,7 +81,7 @@
private IconPack plafIconPack;
private IconPack countryIconPack;
- // keep string reference to prevent GC
+ // keep strong reference to prevent GC
@SuppressWarnings("unused")
private GlobalGuiEventListeners globalEventListeners;
Modified: phex/trunk/src/main/java/phex/gui/common/statusbar/NodeStatusZone.java
===================================================================
--- phex/trunk/src/main/java/phex/gui/common/statusbar/NodeStatusZone.java 2009-09-21 23:48:55 UTC (rev 4489)
+++ phex/trunk/src/main/java/phex/gui/common/statusbar/NodeStatusZone.java 2009-09-22 07:42:24 UTC (rev 4490)
@@ -85,12 +85,12 @@
if ( servent.isUltrapeer() )
{
nodeStatusLabel.setIcon( ultrapeerIcon );
- nodeStatusLabel.setToolTipText( Localizer.getString( "StatusBar_Tooltip_UP" ) );
+ nodeStatusLabel.setToolTipText( Localizer.getString( "StatusBar_TTTUltrapeer" ) );
}
else
{
nodeStatusLabel.setIcon( leafModeIcon );
- nodeStatusLabel.setToolTipText( Localizer.getString( "StatusBar_Tooltip_L" ) );
+ nodeStatusLabel.setToolTipText( Localizer.getString( "StatusBar_TTTLeaf" ) );
}
validate();
}
Modified: phex/trunk/src/main/java/phex/msg/PongMsg.java
===================================================================
--- phex/trunk/src/main/java/phex/msg/PongMsg.java 2009-09-21 23:48:55 UTC (rev 4489)
+++ phex/trunk/src/main/java/phex/msg/PongMsg.java 2009-09-22 07:42:24 UTC (rev 4490)
@@ -248,7 +248,10 @@
public void stripGgepBlock()
{
ggepBlock = null;
- buildBody();
+ // strip extension data...
+ byte[] newBody = new byte[14];
+ System.arraycopy( body, 0, newBody, 0, 14 );
+ body = newBody;
getHeader().setDataLength( body.length );
}
Modified: phex/trunk/src/main/resources/phex/resources/Lang.pot
===================================================================
--- phex/trunk/src/main/resources/phex/resources/Lang.pot 2009-09-21 23:48:55 UTC (rev 4489)
+++ phex/trunk/src/main/resources/phex/resources/Lang.pot 2009-09-22 07:42:24 UTC (rev 4490)
@@ -4160,6 +4160,10 @@
msgid "NetworkTab_LeafMode"
msgstr ""
+#:NetworkTab_UltraPeer
+msgid "NetworkTab_UltraPeer"
+msgstr ""
+
#:NetworkTab_NodeStatus
msgid "NetworkTab_NodeStatus"
msgstr ""
Modified: phex/trunk/src/main/resources/phex/resources/Lang_en_US.po
===================================================================
--- phex/trunk/src/main/resources/phex/resources/Lang_en_US.po 2009-09-21 23:48:55 UTC (rev 4489)
+++ phex/trunk/src/main/resources/phex/resources/Lang_en_US.po 2009-09-22 07:42:24 UTC (rev 4490)
@@ -4196,6 +4196,10 @@
msgid "NetworkTab_LeafMode"
msgstr "Leaf mode"
+#:NetworkTab_UltraPeer
+msgid "NetworkTab_UltraPeer"
+msgstr "Ultrapeer"
+
#:NetworkTab_NodeStatus
msgid "NetworkTab_NodeStatus"
msgstr "Node status:"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|