Cleanups after review and prep for release

This commit is contained in:
zzz
2009-10-11 22:51:43 +00:00
parent 92e323df51
commit 405b85c4b4
14 changed files with 49 additions and 61 deletions

View File

@ -24,11 +24,7 @@ public class Piece implements Comparable {
public boolean equals(Object o) { public boolean equals(Object o) {
if (o instanceof Piece) { if (o instanceof Piece) {
if (o == null) return false; if (o == null) return false;
try {
return this.id == ((Piece)o).id; return this.id == ((Piece)o).id;
} catch (ClassCastException cce) {
return false;
}
} }
return false; return false;
} }

View File

@ -592,7 +592,7 @@ public class I2PSnarkServlet extends HttpServlet {
client = "Robert"; client = "Robert";
else else
client = "Unknown (" + ch + ')'; client = "Unknown (" + ch + ')';
out.write("" + client + "  " + peer.toString().substring(5, 9) + ""); out.write(client + "  " + peer.toString().substring(5, 9));
if (showDebug) if (showDebug)
out.write(" inactive " + (peer.getInactiveTime() / 1000) + "s"); out.write(" inactive " + (peer.getInactiveTime() / 1000) + "s");
out.write("</td>\n\t"); out.write("</td>\n\t");
@ -606,7 +606,7 @@ public class I2PSnarkServlet extends HttpServlet {
String ps = String.valueOf(pct); String ps = String.valueOf(pct);
if (ps.length() > 5) if (ps.length() > 5)
ps = ps.substring(0, 5); ps = ps.substring(0, 5);
out.write("" + ps + "%"); out.write(ps + "%");
} }
out.write("</td>\n\t"); out.write("</td>\n\t");
out.write("<td class=\"snarkTorrentStatus " + rowClass + "\">"); out.write("<td class=\"snarkTorrentStatus " + rowClass + "\">");
@ -615,7 +615,7 @@ public class I2PSnarkServlet extends HttpServlet {
if (remaining > 0) { if (remaining > 0) {
if (peer.isInteresting() && !peer.isChoked()) { if (peer.isInteresting() && !peer.isChoked()) {
out.write("<font color=#008000>"); out.write("<font color=#008000>");
out.write("" + formatSize(peer.getDownloadRate()) + "ps</font>"); out.write(formatSize(peer.getDownloadRate()) + "ps</font>");
} else { } else {
out.write("<font color=#a00000><a title=\""); out.write("<font color=#a00000><a title=\"");
if (!peer.isInteresting()) if (!peer.isInteresting())
@ -630,7 +630,7 @@ public class I2PSnarkServlet extends HttpServlet {
if (pct != 100.0) { if (pct != 100.0) {
if (peer.isInterested() && !peer.isChoking()) { if (peer.isInterested() && !peer.isChoking()) {
out.write("<font color=#008000>"); out.write("<font color=#008000>");
out.write("" + formatSize(peer.getUploadRate()) + "ps</font>"); out.write(formatSize(peer.getUploadRate()) + "ps</font>");
} else { } else {
out.write("<font color=#a00000><a title=\""); out.write("<font color=#a00000><a title=\"");
if (!peer.isInterested()) if (!peer.isInterested())

View File

@ -25,7 +25,7 @@ public class ConfigUIHandler extends FormHandler {
else else
_context.router().setConfigSetting(CSSHelper.PROP_THEME_NAME, _config); _context.router().setConfigSetting(CSSHelper.PROP_THEME_NAME, _config);
if (_context.router().saveConfig()) if (_context.router().saveConfig())
addFormNotice("Theme change saved. <a href=\"configui.jsp\">Refresh the page</a> to actuate phase change."); addFormNotice("Theme change saved. <a href=\"configui.jsp\">Refresh the page</a> to view.");
else else
addFormNotice("Error saving the configuration (applied but not saved) - please see the error logs."); addFormNotice("Error saving the configuration (applied but not saved) - please see the error logs.");
} }

View File

@ -54,7 +54,7 @@ cp *jbigi???* ../../lib/
echo 'Library copied to lib/' echo 'Library copied to lib/'
cd ../.. cd ../..
I2P=~/i2p/i2p I2P=~/i2p
if [ ! -f $I2P/lib/i2p.jar ] if [ ! -f $I2P/lib/i2p.jar ]
then then
echo "I2P installation not found in $I2P - correct \$I2P definition in script to run speed test" echo "I2P installation not found in $I2P - correct \$I2P definition in script to run speed test"

View File

@ -452,8 +452,14 @@ public class Rate {
&& _lifetimeTotalEventTime == r.getLifetimeTotalEventTime(); && _lifetimeTotalEventTime == r.getLifetimeTotalEventTime();
} }
/**
* It doesn't appear that Rates are ever stored in a Set or Map
* (RateStat stores in an array) so let's make this easy.
* We can always make something faster if it's actually used.
*/
@Override @Override
public int hashCode() { public int hashCode() {
/*****
int hash = 5; int hash = 5;
hash = 67 * hash + (int)(Double.doubleToLongBits(this._currentTotalValue) ^ (Double.doubleToLongBits(this._currentTotalValue) >>> 32)); hash = 67 * hash + (int)(Double.doubleToLongBits(this._currentTotalValue) ^ (Double.doubleToLongBits(this._currentTotalValue) >>> 32));
hash = 67 * hash + (int)(this._currentEventCount ^ (this._currentEventCount >>> 32)); hash = 67 * hash + (int)(this._currentEventCount ^ (this._currentEventCount >>> 32));
@ -470,6 +476,8 @@ public class Rate {
hash = 67 * hash + (int)(this._creationDate ^ (this._creationDate >>> 32)); hash = 67 * hash + (int)(this._creationDate ^ (this._creationDate >>> 32));
hash = 67 * hash + (int)(this._period ^ (this._period >>> 32)); hash = 67 * hash + (int)(this._period ^ (this._period >>> 32));
return hash; return hash;
******/
return toString().hashCode();
} }
@Override @Override

View File

@ -1,3 +1,8 @@
* 2009-10-12 0.7.7 released
2009-10-11 zzz
* Misc. cleanups after review, prep for release
2009-10-09 zzz 2009-10-09 zzz
* ElGamalEngine: Fix rare AIOOBE (thanks hottuna!) * ElGamalEngine: Fix rare AIOOBE (thanks hottuna!)
* I2PTunnel: Fix persistent client tunnel keyfile location * I2PTunnel: Fix persistent client tunnel keyfile location

View File

@ -1,5 +1,5 @@
<i2p.news date="$Date: 2009-07-31 00:00:00 $"> <i2p.news date="$Date: 2009-10-12 00:00:00 $">
<i2p.release version="0.7.6" date="2009/07/31" minVersion="0.6"/> <i2p.release version="0.7.7" date="2009/10/12" minVersion="0.6"/>
<h4>Congratulations on getting I2P installed!</h4> <h4>Congratulations on getting I2P installed!</h4>
<ul> <ul>
<li> <li>

View File

@ -4,7 +4,7 @@
<info> <info>
<appname>i2p</appname> <appname>i2p</appname>
<appversion>0.7.6</appversion> <appversion>0.7.7</appversion>
<authors> <authors>
<author name="I2P" email="http://forum.i2p2.de/"/> <author name="I2P" email="http://forum.i2p2.de/"/>
</authors> </authors>

View File

@ -1,5 +1,5 @@
<i2p.news date="$Date: 2009-07-31 00:00:00 $"> <i2p.news date="$Date: 2009-10-12 00:00:00 $">
<i2p.release version="0.7.6" date="2009/07/31" minVersion="0.6" <i2p.release version="0.7.7" date="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/i2pupdate.sud"
publicurl="http://dev.i2p.net/i2p/i2pupdate.sud" publicurl="http://dev.i2p.net/i2p/i2pupdate.sud"
anonannouncement="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9MzBFrOJEOs3X4hwboKWANf7DT5PZKJZ5KorQPsYRSq0E3wSOsFCSsdVCKUGsAAAA/pipermail/i2p/2005-September/000878.html" anonannouncement="http://i2p/NF2RLVUxVulR3IqK0sGJR0dHQcGXAzwa6rEO4WAWYXOHw-DoZhKnlbf1nzHXwMEJoex5nFTyiNMqxJMWlY54cvU~UenZdkyQQeUSBZXyuSweflUXFqKN-y8xIoK2w9Ylq1k8IcrAFDsITyOzjUKoOPfVq34rKNDo7fYyis4kT5bAHy~2N1EVMs34pi2RFabATIOBk38Qhab57Umpa6yEoE~rbyR~suDRvD7gjBvBiIKFqhFueXsR2uSrPB-yzwAGofTXuklofK3DdKspciclTVzqbDjsk5UXfu2nTrC1agkhLyqlOfjhyqC~t1IXm-Vs2o7911k7KKLGjB4lmH508YJ7G9fLAUyjuB-wwwhejoWqvg7oWvqo4oIok8LG6ECR71C3dzCvIjY2QcrhoaazA9G4zcGMm6NKND-H4XY6tUWhpB~5GefB3YczOqMbHq4wi0O9M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N1sbnkwZbKlf4T6~iDdhaSLJd97QCyPOlbyUfYy9QLNExlRqKgNVJcMJRrIual~Lb1CLbnzt0uvobM57UpqSAAAA/meeting141"
publiclogs="http://www.i2p.net/meeting141" /> publiclogs="http://www.i2p.net/meeting141" />
<p> <p>
<h4><ul><li>2009-07-31: <b>0.7.6 <a href="http://www.i2p2.i2p/release-0.7.6.html">Released</a></b></li></ul></h4> <h4><ul><li>2009-10-12: <b>0.7.7 <a href="http://www.i2p2.i2p/release-0.7.7.html">Released</a></b></li></ul></h4>
</p><p> </p><p>
I2P version 0.7.6 contains additional fixes for network stability issues I2P version 0.7.7 contains several anonymity improvements.
related to tunnel building and connection limits. The use of session keys for crypto was completely reworked,
While the 0.7.5 release greatly improved the congestion that and I2PSnark now uses its own tunnels for tracker communication.
appeared UTC evenings and weekends, it was not eliminated; Work continues on improving the router console,
this release should improve the situation further. including conformance to HTML standards and better support of UTF-8.
</p><p> </p><p>
This version also has new console themes by dr|z3d, Work also continues on increasing speeds, both by reducing the
which may be selected on <a href="/configui.jsp">the new UI configuration page</a>. number of session keys transferred, by improving the
Sorry, the new themes are not available for IE browsers. methods of dropping messages during overload, and by reducing
drops by high-bandwidth routers.
There is a new <a href="/configupdate.jsp">unsigned update option</a>
for those of you that would like automatic udpates to bleeding-edge development versions.
</p><p> </p><p>
The default tunnel length variance is changed from 1 to 0. The release also contains several changes to reduce memory and CPU usage,
This mainly affects exploratory tunnels and iMule. and a large assortment of bug fixes.
<a href="http://zzz.i2p/topics/260">As explained on zzz.i2p</a>,
a non-zero variance adds very little protection, at great cost
in resources.
Should you wish to reconfigure your exploratory settings back to the old variance of 1,
or change to length 3 variance 0,
you may do so on <a href="configtunnels.jsp">the config tunnels page</a>.
iMule settings are best changed within that application.
</p><p>
I2P now stores temporary data in the system temp directory
(generally /var/tmp on Linux and %TEMP% on Windows).
For new installs only,
user data is in $HOME/.i2p on Linux/Mac and
%APPDATA%\I2P on Windows.
</p><p>
The release contains several changes to reduce resource usage
(memory, CPU, and connections) and the usual assortment of bug fixes.
Upgrading is recommended. Upgrading is recommended.
</p><p> Please give the
This is the first release built and signed by zzz.
Thanks again to Complication for his many contributions to the project
over the past five years.
I2P is undergoing the most rapid development in years. Please give the
developers feedback on IRC #i2p or <a href="http://forum.i2p">forum.i2p</a> developers feedback on IRC #i2p or <a href="http://forum.i2p">forum.i2p</a>
and <a href="http://www.i2p2.i2p/getinvolved.html">get involved</a>! and <a href="http://www.i2p2.i2p/getinvolved.html">get involved</a>!
</p> </p>

View File

@ -18,9 +18,9 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 26; public final static long BUILD = 0;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = "-rc"; public final static String EXTRA = "";
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA; public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
public static void main(String args[]) { public static void main(String args[]) {
System.out.println("I2P Router version: " + FULL_VERSION); System.out.println("I2P Router version: " + FULL_VERSION);

View File

@ -177,7 +177,8 @@ class PeerTestManager {
testComplete(false); testComplete(false);
} catch (UnknownHostException uhe) { } catch (UnknownHostException uhe) {
if (_log.shouldLog(Log.ERROR)) if (_log.shouldLog(Log.ERROR))
_log.error("Unable to get our IP from bob's reply: " + from + ", " + testInfo, uhe); _log.error("Unable to get our IP (length " + ip.length +
") from bob's reply: " + from + ", " + testInfo, uhe);
} }
} else { } else {
PeerState charlieSession = _transport.getPeerState(from); PeerState charlieSession = _transport.getPeerState(from);

View File

@ -40,7 +40,6 @@ import net.i2p.util.SimpleTimer;
* *
*/ */
public class UDPTransport extends TransportImpl implements TimedWeightedPriorityMessageQueue.FailedListener { public class UDPTransport extends TransportImpl implements TimedWeightedPriorityMessageQueue.FailedListener {
private RouterContext _rContext;
private Log _log; private Log _log;
private UDPEndpoint _endpoint; private UDPEndpoint _endpoint;
/** Peer (Hash) to PeerState */ /** Peer (Hash) to PeerState */

View File

@ -12,8 +12,6 @@ import net.i2p.util.Log;
* *
*/ */
public class TunnelGatewayZeroHop extends TunnelGateway { public class TunnelGatewayZeroHop extends TunnelGateway {
private RouterContext TunnelContext;
private Log TunnelLog;
private TunnelCreatorConfig _config; private TunnelCreatorConfig _config;
private OutboundMessageDistributor _outDistributor; private OutboundMessageDistributor _outDistributor;
private InboundMessageDistributor _inDistributor; private InboundMessageDistributor _inDistributor;
@ -23,11 +21,9 @@ public class TunnelGatewayZeroHop extends TunnelGateway {
*/ */
public TunnelGatewayZeroHop(RouterContext context, TunnelCreatorConfig config) { public TunnelGatewayZeroHop(RouterContext context, TunnelCreatorConfig config) {
super(context, null, null, null); super(context, null, null, null);
TunnelContext = context;
TunnelLog = context.logManager().getLog(TunnelGatewayZeroHop.class);
_config = config; _config = config;
if (config.isInbound()) if (config.isInbound())
_inDistributor = new InboundMessageDistributor(TunnelContext, config.getDestination()); _inDistributor = new InboundMessageDistributor(context, config.getDestination());
else else
_outDistributor = new OutboundMessageDistributor(context, 400); _outDistributor = new OutboundMessageDistributor(context, 400);
} }
@ -53,8 +49,8 @@ public class TunnelGatewayZeroHop extends TunnelGateway {
*/ */
@Override @Override
public void add(I2NPMessage msg, Hash toRouter, TunnelId toTunnel) { public void add(I2NPMessage msg, Hash toRouter, TunnelId toTunnel) {
if (TunnelLog.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
TunnelLog.debug("zero hop gateway: distribute " + (_config.isInbound() ? "inbound " : " outbound ") _log.debug("zero hop gateway: distribute " + (_config.isInbound() ? "inbound " : " outbound ")
+ " to " + (toRouter != null ? toRouter.toBase64().substring(0,4) : "" ) + " to " + (toRouter != null ? toRouter.toBase64().substring(0,4) : "" )
+ "." + (toTunnel != null ? toTunnel.getTunnelId() + "" : "") + "." + (toTunnel != null ? toTunnel.getTunnelId() + "" : "")
+ ": " + msg); + ": " + msg);