2004-12-29 jrandom

* Imported Ragnarok's addressbook source (2.0.2) which is built but not
      deployed in the i2pinstall.jar/i2pupdate.zip (yet).
    * Don't treat connection inactivity closure as a connection error.
This commit is contained in:
jrandom
2004-12-29 22:16:42 +00:00
committed by zzz
parent 00a5d42d3d
commit 099f6a88c2
5 changed files with 35 additions and 9 deletions

View File

@ -26,6 +26,7 @@
<ant dir="apps/netmonitor/java/" target="jar" />
<ant dir="apps/systray/java/" target="jar" />
<ant dir="apps/routerconsole/java/" target="jar" />
<ant dir="apps/addressbook/" target="war" />
</target>
<target name="buildWEB">
<ant dir="apps/jetty" target="fetchJettylib" />
@ -55,6 +56,7 @@
<copy file="apps/netmonitor/java/build/netmonitor.jar" todir="build/" />
<copy file="apps/systray/java/build/systray.jar" todir="build/" />
<copy file="installer/lib/jbigi/jbigi.jar" todir="build" />
<copy file="apps/addressbook/dist/addressbook.war" todir="build/" />
</target>
<target name="javadoc">
<mkdir dir="./build" />
@ -102,6 +104,7 @@
<ant dir="apps/heartbeat/java/" target="distclean" />
<ant dir="apps/netmonitor/java/" target="distclean" />
<ant dir="apps/routerconsole/java/" target="distclean" />
<ant dir="apps/addressbook/" target="distclean" />
<ant dir="apps/systray/java/" target="distclean" />
<ant dir="installer/java/" target="distclean" />
<delete>
@ -178,6 +181,15 @@
<copy file="build/xml-apis.jar" todir="pkg-temp/lib/" />
<copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
<copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
<!--
<mkdir dir="pkg-temp/addressbook" />
<copy file="apps/addressbook/config.txt" todir="pkg-temp/addressbook/" />
<copy file="apps/addressbook/myhosts.txt" todir="pkg-temp/addressbook/" />
<copy file="apps/addressbook/subscriptions.txt" todir="pkg-temp/addressbook/" />
<copy file="build/addressbook.war" todir="pkg-temp/webapps/" />
-->
<copy file="installer/resources/clients.config" todir="pkg-temp/" />
<copy file="installer/resources/i2prouter" todir="pkg-temp/" />
<copy file="installer/resources/i2prouter.bat" todir="pkg-temp/" />
@ -239,6 +251,12 @@
<copy file="build/routerconsole.jar" todir="pkg-temp/lib/" />
<copy file="build/i2ptunnel.war" todir="pkg-temp/webapps/" />
<copy file="build/routerconsole.war" todir="pkg-temp/webapps/" />
<!--
<mkdir dir="pkg-temp/addressbook" />
<copy file="build/addressbook.war" todir="pkg-temp/webapps/" />
-->
<copy file="history.txt" todir="pkg-temp/" />
<copy file="hosts.txt" todir="pkg-temp/" />
<mkdir dir="pkg-temp/eepsite" />

View File

@ -1,4 +1,9 @@
$Id: history.txt,v 1.119 2004/12/29 10:53:30 jrandom Exp $
$Id: history.txt,v 1.120 2004/12/29 15:06:43 jrandom Exp $
2004-12-29 jrandom
* Imported Ragnarok's addressbook source (2.0.2) which is built but not
deployed in the i2pinstall.jar/i2pupdate.zip (yet).
* Don't treat connection inactivity closure as a connection error.
2004-12-29 jrandom
* Add in a new keepalive event on each TCP connection, proactively sending

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.124 $ $Date: 2004/12/29 10:53:28 $";
public final static String ID = "$Revision: 1.125 $ $Date: 2004/12/29 15:06:44 $";
public final static String VERSION = "0.4.2.5";
public final static long BUILD = 2;
public final static long BUILD = 3;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION);
System.out.println("Router ID: " + RouterVersion.ID);

View File

@ -168,7 +168,7 @@ class ConnectionRunner implements Runnable {
+ " due to " + DataHelper.formatDuration(timeSinceWrite)
+ " of inactivity after "
+ DataHelper.formatDuration(_con.getLifetime()));
_con.closeConnection();
_con.closeConnection(false);
return;
}
if (_lastTimeSend < _context.clock().now() - 2*TIME_SEND_FREQUENCY)

View File

@ -111,7 +111,8 @@ public class TCPConnection {
* be called multiple times safely.
*
*/
public synchronized void closeConnection() {
public synchronized void closeConnection() { closeConnection(true); }
public synchronized void closeConnection(boolean wasError) {
if (_log.shouldLog(Log.INFO)) {
if (_ident != null)
_log.info("Connection between " + _ident.getHash().toBase64().substring(0,6)
@ -140,10 +141,12 @@ public class TCPConnection {
msg.timestamp("closeConnection");
_transport.afterSend(msg, false, true, -1);
}
_context.profileManager().commErrorOccurred(_ident.getHash());
_transport.addConnectionErrorMessage("Connection closed with "
+ _ident.getHash().toBase64().substring(0,6)
+ " after " + DataHelper.formatDuration(getLifetime()));
if (wasError) {
_context.profileManager().commErrorOccurred(_ident.getHash());
_transport.addConnectionErrorMessage("Connection closed with "
+ _ident.getHash().toBase64().substring(0,6)
+ " after " + DataHelper.formatDuration(getLifetime()));
}
_transport.connectionClosed(this);
}