Changeset ee22244


Ignore:
Timestamp:
Mar 5, 2012 3:00:02 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
6c2d4de
Parents:
af1a49e (diff), 3240dac (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge of '166d63ea25334cf53075e0d418ececcb1d8bc6ca'

and 'e42352d45c2c9304562eed404c9c2dd8120becc5'

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/WebAppConfiguration.java

    raf1a49e ree22244  
    88
    99import org.mortbay.jetty.webapp.Configuration;
     10import org.mortbay.jetty.webapp.WebAppClassLoader;
    1011import org.mortbay.jetty.webapp.WebAppContext;
    1112
     
    4647    }
    4748
    48     public void configureClassPath() throws Exception {
     49    /**
     50     *  This was the interface in Jetty 5, now it's configureClassLoader()
     51     */
     52    private void configureClassPath() throws Exception {
    4953        String ctxPath = _wac.getContextPath();
    5054        //System.err.println("Configure Class Path " + ctxPath);
     
    7983            return;
    8084        StringTokenizer tok = new StringTokenizer(cp, " ,");
     85        StringBuilder buf = new StringBuilder();
    8186        while (tok.hasMoreTokens()) {
     87            if (buf.length() > 0)
     88                buf.append(',');
    8289            String elem = tok.nextToken().trim();
    8390            String path;
     
    8996                path = dir.getAbsolutePath() + '/' + elem;
    9097            System.err.println("Adding " + path + " to classpath for " + appName);
    91             _wac.setExtraClasspath(path);
     98            buf.append(path);
     99        }
     100        ClassLoader cl = _wac.getClassLoader();
     101        if (cl != null && cl instanceof WebAppClassLoader) {
     102            WebAppClassLoader wacl = (WebAppClassLoader) cl;
     103            wacl.addClassPath(buf.toString());
     104        } else {
     105            // This was not working because the WebAppClassLoader already exists
     106            // and it calls getExtraClasspath in its constructor
     107            // Not sure why WACL already exists...
     108            _wac.setExtraClasspath(buf.toString());
    92109        }
    93110    }
     
    100117
    101118    /** @since Jetty 6 */
    102     public void configureClassLoader() {}
     119    public void configureClassLoader() throws Exception {
     120        configureClassPath();
     121    }
    103122}
  • apps/routerconsole/jsp/configclients.jsp

    raf1a49e ree22244  
    102102 <%=intl._("A web app may also be disabled by removing the .war file from the webapps directory; however the .war file and web app will reappear when you update your router to a newer version, so disabling the web app here is the preferred method.")%>
    103103 </p><div class="wideload">
    104 <form action="" method="POST">
     104<form action="configclients" method="POST">
    105105<input type="hidden" name="nonce" value="<%=pageNonce%>" >
    106106 <jsp:getProperty name="clientshelper" property="form2" />
     
    126126 <%=intl._("To install a plugin, enter the download URL:")%>
    127127 </p><div class="wideload">
    128 <form action="" method="POST">
     128<form action="configclients" method="POST">
    129129<input type="hidden" name="nonce" value="<%=pageNonce%>" >
    130130<p>
  • apps/routerconsole/jsp/viewstat.jsp

    raf1a49e ree22244  
    4545        // very brief 45 sec expire
    4646        response.setDateHeader("Expires", net.i2p.I2PAppContext.getGlobalContext().clock().now() + (45*1000));
     47        // http://jira.codehaus.org/browse/JETTY-1346
     48        // This doesn't actually appear in the response, but it fixes the problem,
     49        // so Jetty must look for this header and close the connection.
     50        response.setHeader("Connection", "Close");
    4751        int width = -1;
    4852        int height = -1;
  • build.xml

    raf1a49e ree22244  
    11421142    </target>
    11431143
    1144     <target name="installer" depends="preppkg, buildProperties, util-list-changes, izpack-patches" >
     1144    <target name="utility-jars" depends="buildCore" >
    11451145        <mkdir dir="pkg-temp/installer" />
    11461146        <!-- set if unset -->
     
    11731173            </manifest>
    11741174        </jar>
     1175    </target>
     1176
     1177    <target name="installer" depends="preppkg, buildProperties, util-list-changes, izpack-patches, utility-jars" >
    11751178        <!--
    11761179          Force 1.5 pack200 output
     
    12601263    </target>
    12611264
    1262     <target name="installer-windows" depends="clean, preppkg-windows-only, util-list-changes, izpack-patches" >
    1263         <mkdir dir="pkg-temp/installer" />
    1264         <!-- set if unset -->
    1265         <property name="workspace.changes.util.tr" value="" />
    1266         <jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class">
    1267             <manifest>
    1268                 <attribute name="Main-Class" value="net.i2p.util.Copy" />
    1269                 <attribute name="Built-By" value="${build.built-by}" />
    1270                 <attribute name="Build-Date" value="${build.timestamp}" />
    1271                 <attribute name="Base-Revision" value="${workspace.version}" />
    1272                 <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
    1273             </manifest>
    1274         </jar>
    1275         <jar destfile="./pkg-temp/installer/delete.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Delete.class net/i2p/util/FileUtil.class">
    1276             <manifest>
    1277                 <attribute name="Main-Class" value="net.i2p.util.Delete" />
    1278                 <attribute name="Built-By" value="${build.built-by}" />
    1279                 <attribute name="Build-Date" value="${build.timestamp}" />
    1280                 <attribute name="Base-Revision" value="${workspace.version}" />
    1281                 <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
    1282             </manifest>
    1283         </jar>
    1284         <jar destfile="./pkg-temp/installer/exec.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Exec.class">
    1285             <manifest>
    1286                 <attribute name="Main-Class" value="net.i2p.util.Exec" />
    1287                 <attribute name="Built-By" value="${build.built-by}" />
    1288                 <attribute name="Build-Date" value="${build.timestamp}" />
    1289                 <attribute name="Base-Revision" value="${workspace.version}" />
    1290                 <attribute name="Workspace-Changes" value="${workspace.changes.util.tr}" />
    1291             </manifest>
    1292         </jar>
     1265    <target name="installer-windows" depends="clean, preppkg-windows-only, util-list-changes, izpack-patches, utility-jars" >
    12931266        <izpack input="${basedir}/installer/install.xml" output="${basedir}/install.jar" installerType="standard" basedir="${basedir}" />
    12941267        <ant target="installerexe" />
     
    13891362    <target name="release" depends="distclean, updaterWithJettyFixesAndJbigi , updater200WithJettyFixes, preppkg, installer, getReleaseNumber" >
    13901363-->
    1391     <target name="release" depends="verifyReleaseBuildNumbers, distclean, testscripts, updaterRepack, updater200, preppkgRepack, installer" >
     1364    <target name="release" depends="verifyReleaseBuildNumbers, distclean, testscripts, updaterWithJettyRepack, updater200WithJetty, preppkgRepack, installer-nowindows, installer-windows" >
    13921365        <echo message="================================================================" />
    13931366        <echo message="Did you update these files?" />
     
    14081381        <echo message="New version number is ${release.number}" />
    14091382        <copy file="i2pupdate.zip" tofile="i2pupdate_${release.number}.zip" />
    1410         <copy file="i2pinstall.exe" tofile="i2pinstall_${release.number}.exe" />
     1383        <copy file="i2pinstall_${full.version}_windows-only.exe" tofile="i2pinstall_${release.number}.exe" />
     1384        <copy file="i2pinstall_${full.version}.jar" tofile="i2pinstall_${release.number}.jar" />
    14111385        <delete file="i2pupdate.sud" />
    14121386        <delete file="i2pupdate.su2" />
     
    15071481        <echo message="Sign the files:" />
    15081482        <delete file="i2pinstall_${release.number}.exe.sig" />
     1483        <delete file="i2pinstall_${release.number}.jar.sig" />
    15091484        <delete file="i2psource_${release.number}.tar.bz2.sig" />
    15101485        <delete file="i2pupdate_${release.number}.zip.sig" />
     
    15151490        <exec executable="gpg" failonerror="true">
    15161491            <arg value="-b" />
     1492            <arg value="i2pinstall_${release.number}.jar" />
     1493        </exec>
     1494        <exec executable="gpg" failonerror="true">
     1495            <arg value="-b" />
    15171496            <arg value="i2psource_${release.number}.tar.bz2" />
    15181497        </exec>
     
    15241503            <arg value="444" />
    15251504            <arg value="i2pinstall_${release.number}.exe" />
     1505            <arg value="i2pinstall_${release.number}.jar" />
    15261506            <arg value="i2psource_${release.number}.tar.bz2" />
    15271507            <arg value="i2pupdate_${release.number}.zip" />
     
    15291509            <arg value="i2pupdate.sud" />
    15301510            <arg value="i2pinstall_${release.number}.exe.sig" />
     1511            <arg value="i2pinstall_${release.number}.jar.sig" />
    15311512            <arg value="i2psource_${release.number}.tar.bz2.sig" />
    15321513            <arg value="i2pupdate_${release.number}.zip.sig" />
     
    15361517            <arg value="-l" />
    15371518            <arg value="i2pinstall_${release.number}.exe" />
     1519            <arg value="i2pinstall_${release.number}.jar" />
    15381520            <arg value="i2psource_${release.number}.tar.bz2" />
    15391521            <arg value="i2pupdate_${release.number}.zip" />
     
    15411523            <arg value="i2pupdate.sud" />
    15421524            <arg value="i2pinstall_${release.number}.exe.sig" />
     1525            <arg value="i2pinstall_${release.number}.jar.sig" />
    15431526            <arg value="i2psource_${release.number}.tar.bz2.sig" />
    15441527            <arg value="i2pupdate_${release.number}.zip.sig" />
     
    15471530        <exec executable="sha256sum" failonerror="true">
    15481531            <arg value="i2pinstall_${release.number}.exe" />
     1532            <arg value="i2pinstall_${release.number}.jar" />
    15491533            <arg value="i2psource_${release.number}.tar.bz2" />
    15501534            <arg value="i2pupdate_${release.number}.zip" />
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodfillMonitorJob.java

    raf1a49e ree22244  
    2727    private static final long MIN_UPTIME = 2*60*60*1000;
    2828    private static final long MIN_CHANGE_DELAY = 6*60*60*1000;
    29     private static final int MIN_FF = 200;
     29    private static final int MIN_FF = 250;
    3030    private static final int MAX_FF = 999999;
    3131    private static final String PROP_FLOODFILL_PARTICIPANT = "router.floodfillParticipant";
  • router/java/src/net/i2p/router/transport/udp/UDPTransport.java

    raf1a49e ree22244  
    478478        boolean inboundRecent = _lastInboundReceivedOn + ALLOW_IP_CHANGE_INTERVAL > System.currentTimeMillis();
    479479        if (_log.shouldLog(Log.INFO))
    480             _log.info("External address received: " + RemoteHostId.toString(ourIP) + ":" + ourPort + " from "
     480            _log.info("External address received: " + Addresses.toString(ourIP, ourPort) + " from "
    481481                      + from.toBase64() + ", isValid? " + isValid + ", explicitSpecified? " + explicitSpecified
    482482                      + ", receivedInboundRecent? " + inboundRecent + " status " + _reachabilityStatus);
     
    492492            if (_log.shouldLog(Log.ERROR))
    493493                _log.error("The router " + from.toBase64() + " told us we have an invalid IP - "
    494                            + RemoteHostId.toString(ourIP) + " port " +  ourPort + ".  Lets throw tomatoes at them");
     494                           + Addresses.toString(ourIP, ourPort) + ".  Lets throw tomatoes at them");
    495495            markUnreachable(from);
    496496            //_context.shitlist().shitlistRouter(from, "They said we had an invalid IP", STYLE);
     
    507507            _lastOurIP = ourIP;
    508508            _lastOurPort = ourPort;
    509             if (_log.shouldLog(Log.WARN))
    510                 _log.warn("The router " + from.toBase64() + " told us we have a new IP - "
    511                            + RemoteHostId.toString(ourIP) + " port " +  ourPort + ".  Wait until somebody else tells us the same thing.");
     509            if (_log.shouldLog(Log.INFO))
     510                _log.info("The router " + from.toBase64() + " told us we have a new IP - "
     511                           + Addresses.toString(ourIP, ourPort) + ".  Wait until somebody else tells us the same thing.");
    512512        } else {
    513             if (_log.shouldLog(Log.WARN))
    514                 _log.warn(from.toBase64() + " and " + _lastFrom.toBase64() + " agree we have a new IP - "
    515                            + RemoteHostId.toString(ourIP) + " port " +  ourPort + ".  Changing address.");
     513            if (_log.shouldLog(Log.INFO))
     514                _log.info(from.toBase64() + " and " + _lastFrom.toBase64() + " agree we have a new IP - "
     515                           + Addresses.toString(ourIP, ourPort) + ".  Changing address.");
    516516            _lastFrom = from;
    517517            _lastOurIP = ourIP;
     
    531531        boolean fireTest = false;
    532532
    533         if (_log.shouldLog(Log.WARN))
    534             _log.warn("Change address? status = " + _reachabilityStatus +
     533        if (_log.shouldLog(Log.INFO))
     534            _log.info("Change address? status = " + _reachabilityStatus +
    535535                      " diff = " + (_context.clock().now() - _reachabilityStatusLastUpdated) +
    536536                      " old = " + _externalListenHost + ':' + _externalListenPort +
    537                       " new = " + RemoteHostId.toString(ourIP) + ':' + ourPort);
     537                      " new = " + Addresses.toString(ourIP, ourPort));
    538538
    539539            synchronized (this) {
     
    545545                    //     (_context.clock().now() - _reachabilityStatusLastUpdated > 2*TEST_FREQUENCY) ) {
    546546                        // they told us something different and our tests are either old or failing
    547                         if (_log.shouldLog(Log.WARN))
    548                             _log.warn("Trying to change our external address...");
    549547                        try {
    550548                            _externalListenHost = InetAddress.getByAddress(ourIP);
     
    552550                            if (ourPort >= MIN_EXTERNAL_PORT && !fixedPort)
    553551                                _externalListenPort = ourPort;
     552                            if (_log.shouldLog(Log.WARN))
     553                                _log.warn("Trying to change our external address to " +
     554                                          Addresses.toString(ourIP, _externalListenPort));
    554555                            if (_externalListenPort > 0)  {
    555556                                rebuildExternalAddress();
     
    560561                            _externalListenHost = null;
    561562                            if (_log.shouldLog(Log.WARN))
    562                                 _log.warn("Error trying to change our external address", uhe);
     563                                _log.warn("Error trying to change our external address to " +
     564                                          Addresses.toString(ourIP, ourPort), uhe);
    563565                        }
    564566                    //} else {
Note: See TracChangeset for help on using the changeset viewer.