merge of '3f85581f65aedde0f96729d197aaab223174f2e4'

and '6df9f4e154d148867ee158cbe9e9acf3fb73d680'
This commit is contained in:
dg2-new
2013-11-10 22:22:10 +00:00
23 changed files with 15 additions and 37 deletions

View File

@@ -517,7 +517,6 @@ public class MetaInfo
* @since 0.9.1
*/
boolean checkPiece(PartialPiece pp) {
MessageDigest sha1 = SHA1.getInstance();
int piece = pp.getPiece();
byte[] hash;
try {

View File

@@ -754,7 +754,7 @@ public class SnarkManager implements CompleteListener {
* @since 0.9.1
*/
public void saveOpenTrackers(List<String> ot) {
String val = setListConfig(PROP_OPENTRACKERS, ot);
setListConfig(PROP_OPENTRACKERS, ot);
if (ot == null)
ot = Collections.singletonList(I2PSnarkUtil.DEFAULT_OPENTRACKERS);
_util.setOpenTrackers(ot);

View File

@@ -2548,7 +2548,7 @@ public class I2PSnarkServlet extends BasicServlet {
if (showPriority) {
buf.append("<td class=\"priority\">");
File f = item;
if ((!complete) && (!item.isDirectory()) && f != null) {
if ((!complete) && (!item.isDirectory())) {
int pri = snark.getStorage().getPriority(f.getCanonicalPath());
buf.append("<input type=\"radio\" value=\"5\" name=\"pri.").append(f.getCanonicalPath()).append("\" ");
if (pri > 0)

View File

@@ -273,8 +273,6 @@ public class IndexBean {
TunnelController cur = getController(_tunnel);
Properties config = getConfig();
if (config == null)
return "Invalid params";
if (cur == null) {
// creating new
@@ -970,8 +968,6 @@ public class IndexBean {
TunnelController tun = getController(_tunnel);
Properties config = getConfig();
if (config == null)
return "Invalid params";
if (tun == null) {
// creating new
tun = new TunnelController(config, "", true);
@@ -1038,8 +1034,6 @@ public class IndexBean {
private String generateNewEncryptionKey() {
TunnelController tun = getController(_tunnel);
Properties config = getConfig();
if (config == null)
return "Invalid params";
if (tun == null) {
// creating new
tun = new TunnelController(config, "", true);

View File

@@ -93,7 +93,8 @@ class ConnectionDataReceiver implements MessageOutputStream.DataReceiver {
if (doSend) {
PacketLocal packet = send(buf, off, size);
if (packet == null) return _dummyStatus;
// this shouldn't be null
//if (packet == null) return _dummyStatus;
//dont wait for non-acks
if ( (packet.getSequenceNum() > 0) || (packet.isFlagSet(Packet.FLAG_SYNCHRONIZE)) )