merge of 'ae690eef1560c4b0cbabfd7f75a663bac6b6ee99'

and 'd88d323de60e5ba66e1c96e2d11f91de9029b27d'
This commit is contained in:
zzz
2011-03-02 18:24:18 +00:00
31 changed files with 231 additions and 3258 deletions

View File

@@ -134,7 +134,7 @@ public class I2PSnarkUtil {
}
/**
* @param KBps
* @param limit KBps
*/
public void setMaxUpBW(int limit) {
_maxUpBW = limit;

View File

@@ -57,7 +57,7 @@ class MagnetState {
}
/**
* @param call this for a new magnet when you have the size
* Call this for a new magnet when you have the size
* @throws IllegalArgumentException
*/
public void initialize(int size) {
@@ -77,7 +77,7 @@ class MagnetState {
}
/**
* @param Call this for a new magnet when the download is complete.
* Call this for a new magnet when the download is complete.
* @throws IllegalArgumentException
*/
public void setMetaInfo(MetaInfo meta) {

View File

@@ -644,7 +644,7 @@ public class SnarkManager implements Snark.CompleteListener {
* @param name hex or b32 name from the magnet link
* @param ih 20 byte info hash
* @param trackerURL may be null
* @param udpateStatus should we add this magnet to the config file,
* @param updateStatus should we add this magnet to the config file,
* to save it across restarts, in case we don't get
* the metadata before shutdown?
* @throws RuntimeException via Snark.fatal()

View File

@@ -54,7 +54,7 @@ public interface DHT {
* Non-blocking.
*
* @param ih the Info Hash (torrent)
* @param peer the peer's Hash
* @param peerHash the peer's Hash
*/
public void announce(byte[] ih, byte[] peerHash);

View File

@@ -353,7 +353,7 @@ public class I2PSnarkServlet extends Default {
boolean isDegraded = ua != null && (ua.startsWith("Lynx") || ua.startsWith("w3m") ||
ua.startsWith("ELinks") || ua.startsWith("Dillo"));
boolean noThinsp = isDegraded || ua.startsWith("Opera");
boolean noThinsp = isDegraded || (ua != null && ua.startsWith("Opera"));
if (_manager.util().connected()) {
if (isDegraded)
out.write("<a href=\"/i2psnark/?action=StopAll&amp;nonce=" + _nonce + "\"><img title=\"");
@@ -1883,7 +1883,8 @@ public class I2PSnarkServlet extends Default {
mime = "";
if (mime.equals("text/html"))
icon = "html";
else if (mime.equals("text/plain") || plc.endsWith(".nfo"))
else if (mime.equals("text/plain") || plc.endsWith(".nfo") ||
mime.equals("application/rtf"))
icon = "page";
else if (mime.equals("application/java-archive") || plc.endsWith(".war") ||
plc.endsWith(".deb"))

View File

@@ -63,11 +63,16 @@
</javac>
</target>
<target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" >
<!-- the jar with the latest message classes from the jsps, and the war too -->
<target name="jar" depends="jar1, war, bundle" />
<!-- the jar without the latest message classes from the jsps -->
<target name="jar1" depends="compile, jarUpToDate" unless="jar.uptodate" >
<exec executable="mtn" outputproperty="workspace.changes.j" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
<arg value="changed" />
<arg value="." />
<arg value="../locale" />
</exec>
<!-- \n in an attribute value generates an invalid manifest -->
<exec executable="tr" inputstring="${workspace.changes.j}" outputproperty="workspace.changes.j.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
@@ -85,15 +90,16 @@
<attribute name="Workspace-Changes" value="${workspace.changes.j.tr}" />
</manifest>
</jar>
<delete dir="./tmpextract" />
<!-- jrobin taken out of routerconsole.jar in 0.7.12
<delete dir="./tmpextract" />
<unjar src="../../jrobin/jrobin-1.4.0.jar" dest="./tmpextract" />
<jar destfile="./build/routerconsole.jar" basedir="./tmpextract" update="true" />
<delete dir="./tmpextract" />
-->
<ant target="war" />
</target>
<!-- this is tricky because the message classes go in the jar, not in the war -->
<target name="bundle" depends="jar1, precompilejsp" >
<!-- Update the messages_*.po files.
We need to supply the bat file for windows, and then change the fail property to true -->
<exec executable="sh" osfamily="unix" failifexecutionfails="true" >
@@ -117,8 +123,7 @@
</uptodate>
</target>
<target name="poupdate" depends="build">
<ant target="war" />
<target name="poupdate" depends="precompilejsp">
<!-- Update the messages_*.po files.
We need to supply the bat file for windows, and then change the fail property to true -->
<exec executable="sh" osfamily="unix" failifexecutionfails="true" >
@@ -135,6 +140,7 @@
</exec>
</target>
<!-- does NOT update the message classes, as those go in the jar -->
<target name="war" depends="precompilejsp, warUpToDate" unless="war.uptodate" >
<exec executable="mtn" outputproperty="workspace.changes.w" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" />
@@ -164,7 +170,7 @@
</uptodate>
</target>
<target name="precompilejsp" unless="precompilejsp.uptodate">
<target name="precompilejsp" depends="jar1" unless="precompilejsp.uptodate">
<delete dir="../jsp/WEB-INF/" />
<delete file="../jsp/web-fragment.xml" />
<delete file="../jsp/web-out.xml" />
@@ -265,7 +271,7 @@
</target>
<uptodate property="precompilejsp.uptodate" targetfile="../jsp/web-out.xml">
<srcfiles dir= "../jsp" includes="**/*.jsp, **/*.html, *.css, susimail/susimail, web.xml"/>
<srcfiles dir= "../jsp" includes="**/*.jsp, *.jsi, **/*.html, *.css, susimail/susimail, web.xml"/>
</uptodate>
<target name="javadoc">