merge of '1fd43bf251a91d33bb1ea9b06f2b35a40be3b9c9'

and '766a92b57cdf82d3b1d1e3a71ef2a3109e883add'
This commit is contained in:
dg2-new
2014-01-04 17:41:15 +00:00
7 changed files with 51 additions and 15 deletions

View File

@@ -13,6 +13,7 @@ import net.i2p.I2PAppContext;
import net.i2p.client.streaming.I2PSocketEepGet;
import net.i2p.client.streaming.I2PSocketManager;
import net.i2p.crypto.SHA1;
import net.i2p.data.DataHelper;
import net.i2p.util.EepGet;
import net.i2p.util.I2PAppThread;
import net.i2p.util.Log;
@@ -96,7 +97,7 @@ public class FetchAndAdd extends Snark implements EepGet.StatusListener, Runnabl
add(file);
} else {
_mgr.addMessage(_("Torrent was not retrieved from {0}", urlify(_url)) +
((_failCause != null) ? (": " + _failCause) : ""));
((_failCause != null) ? (": " + DataHelper.stripHTML(_failCause)) : ""));
}
if (file != null)
file.delete();

View File

@@ -71,8 +71,8 @@ public class ConfigRestartBean {
buf.append(_("Shutdown in {0}", DataHelper.formatDuration2(timeRemaining), ctx));
int tuns = ctx.tunnelManager().getParticipatingCount();
if (tuns > 0) {
buf.append("<br>").append(ngettext("Please wait for routing commitment on {0} tunnel to expire",
"Please wait for routing commitments on {0} tunnels to expire",
buf.append("<br>").append(ngettext("Please wait for routing commitment to expire for {0} tunnel",
"Please wait for routing commitments to expire for {0} tunnels",
tuns, ctx));
}
buf.append("</h4><hr>");
@@ -82,8 +82,8 @@ public class ConfigRestartBean {
buf.append(_("Restart in {0}", DataHelper.formatDuration2(timeRemaining), ctx));
int tuns = ctx.tunnelManager().getParticipatingCount();
if (tuns > 0) {
buf.append("<br>").append(ngettext("Please wait for routing commitment on {0} tunnel to expire",
"Please wait for routing commitments on {0} tunnels to expire",
buf.append("<br>").append(ngettext("Please wait for routing commitment to expire for {0} tunnel",
"Please wait for routing commitments to expire for {0} tunnels",
tuns, ctx));
}
buf.append("</h4><hr>");

View File

@@ -305,8 +305,9 @@ public class I2PSocketManagerFull implements I2PSocketManager {
I2PSocket sock = connect(peer, options);
return new StandardSocket(sock);
} catch (I2PException i2pe) {
// fixme in 1.6 change to cause
throw new IOException(i2pe.toString());
IOException ioe = new IOException("connect fail");
ioe.initCause(i2pe);
throw ioe;
}
}

View File

@@ -44,8 +44,9 @@ class StandardServerSocket extends ServerSocket {
throw new IOException("No socket");
return new StandardSocket(sock);
} catch (I2PException i2pe) {
// fixme in 1.6 change to cause
throw new IOException(i2pe.toString());
IOException ioe = new IOException("accept fail");
ioe.initCause(i2pe);
throw ioe;
}
}