This commit is contained in:
zzz
2016-10-21 15:20:35 +00:00
parent 9b27251473
commit cee3ebbb23
22 changed files with 48 additions and 48 deletions

View File

@ -866,7 +866,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private ReplyWaiter sendQuery(NodeInfo nInfo, Map<String, Object> map, boolean repliable) { private ReplyWaiter sendQuery(NodeInfo nInfo, Map<String, Object> map, boolean repliable) {
if (nInfo.equals(_myNodeInfo)) if (nInfo.equals(_myNodeInfo))
throw new IllegalArgumentException("wtf don't send to ourselves"); throw new IllegalArgumentException("don't send to ourselves");
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
_log.debug("Sending query to: " + nInfo); _log.debug("Sending query to: " + nInfo);
if (nInfo.getDestination() == null) { if (nInfo.getDestination() == null) {
@ -916,7 +916,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private boolean sendResponse(NodeInfo nInfo, MsgID msgID, Map<String, Object> map) { private boolean sendResponse(NodeInfo nInfo, MsgID msgID, Map<String, Object> map) {
if (nInfo.equals(_myNodeInfo)) if (nInfo.equals(_myNodeInfo))
throw new IllegalArgumentException("wtf don't send to ourselves"); throw new IllegalArgumentException("don't send to ourselves");
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
_log.debug("Sending response to: " + nInfo); _log.debug("Sending response to: " + nInfo);
if (nInfo.getDestination() == null) { if (nInfo.getDestination() == null) {
@ -946,7 +946,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
*/ */
private boolean sendError(NodeInfo nInfo, MsgID msgID, Map<String, Object> map) { private boolean sendError(NodeInfo nInfo, MsgID msgID, Map<String, Object> map) {
if (nInfo.equals(_myNodeInfo)) if (nInfo.equals(_myNodeInfo))
throw new IllegalArgumentException("wtf don't send to ourselves"); throw new IllegalArgumentException("don't send to ourselves");
if (_log.shouldLog(Log.INFO)) if (_log.shouldLog(Log.INFO))
_log.info("Sending error to: " + nInfo); _log.info("Sending error to: " + nInfo);
if (nInfo.getDestination() == null) { if (nInfo.getDestination() == null) {
@ -1004,7 +1004,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
return false; return false;
} }
if (dest.calculateHash().equals(_myNodeInfo.getHash())) if (dest.calculateHash().equals(_myNodeInfo.getHash()))
throw new IllegalArgumentException("wtf don't send to ourselves"); throw new IllegalArgumentException("don't send to ourselves");
byte[] payload = BEncoder.bencode(map); byte[] payload = BEncoder.bencode(map);
if (_log.shouldLog(Log.DEBUG)) { if (_log.shouldLog(Log.DEBUG)) {
ByteArrayInputStream bais = new ByteArrayInputStream(payload); ByteArrayInputStream bais = new ByteArrayInputStream(payload);
@ -1020,7 +1020,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
payload = dgMaker.makeI2PDatagram(payload); payload = dgMaker.makeI2PDatagram(payload);
if (payload == null) { if (payload == null) {
if (_log.shouldLog(Log.WARN)) if (_log.shouldLog(Log.WARN))
_log.warn("WTF DGM fail"); _log.warn("DGM fail");
return false; return false;
} }
} }
@ -1040,7 +1040,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
_txBytes.addAndGet(payload.length); _txBytes.addAndGet(payload.length);
} else { } else {
if (_log.shouldLog(Log.WARN)) if (_log.shouldLog(Log.WARN))
_log.warn("WTF sendMessage fail"); _log.warn("sendMessage fail");
} }
return success; return success;
} catch (I2PSessionException ise) { } catch (I2PSessionException ise) {

View File

@ -64,7 +64,7 @@ abstract class IRCFilter {
idx++; idx++;
command = field[idx++].toUpperCase(Locale.US); command = field[idx++].toUpperCase(Locale.US);
} catch (IndexOutOfBoundsException ioobe) { } catch (IndexOutOfBoundsException ioobe) {
// wtf, server sent borked command? // server sent borked command?
//_log.warn("Dropping defective message: index out of bounds while extracting command."); //_log.warn("Dropping defective message: index out of bounds while extracting command.");
return null; return null;
} }
@ -282,7 +282,7 @@ abstract class IRCFilter {
if(field[0].charAt(0)==':') if(field[0].charAt(0)==':')
return null; // wtf return null; // ???
String command = field[0].toUpperCase(Locale.US); String command = field[0].toUpperCase(Locale.US);

View File

@ -168,7 +168,7 @@ class SOCKS5Server extends SOCKSServer {
private int manageRequest(DataInputStream in, DataOutputStream out) throws IOException, SOCKSException { private int manageRequest(DataInputStream in, DataOutputStream out) throws IOException, SOCKSException {
int socksVer = in.readUnsignedByte(); int socksVer = in.readUnsignedByte();
if (socksVer != SOCKS_VERSION_5) { if (socksVer != SOCKS_VERSION_5) {
_log.debug("error in SOCKS5 request (protocol != 5? wtf?)"); _log.debug("error in SOCKS5 request (protocol != 5?)");
throw new SOCKSException("Invalid protocol version in request: " + socksVer); throw new SOCKSException("Invalid protocol version in request: " + socksVer);
} }
@ -221,7 +221,7 @@ class SOCKS5Server extends SOCKSServer {
{ {
int addrLen = in.readUnsignedByte(); int addrLen = in.readUnsignedByte();
if (addrLen == 0) { if (addrLen == 0) {
_log.debug("0-sized address length? wtf?"); _log.debug("0-sized address length?");
throw new SOCKSException("Illegal DOMAINNAME length"); throw new SOCKSException("Illegal DOMAINNAME length");
} }
byte addr[] = new byte[addrLen]; byte addr[] = new byte[addrLen];
@ -315,7 +315,7 @@ class SOCKS5Server extends SOCKSServer {
dreps.writeBytes(domainName); dreps.writeBytes(domainName);
break; break;
default: default:
_log.error("unknown address type passed to sendReply() (" + Integer.toHexString(addressType) + ")! wtf?"); _log.error("unknown address type passed to sendReply() (" + Integer.toHexString(addressType) + ")!");
return; return;
} }

View File

@ -97,7 +97,7 @@ public class TestSwarm {
flooder.closed(); flooder.closed();
_log.debug("Connection " + flooder.getConnectionId() + " closed to " + flooder.getDestination()); _log.debug("Connection " + flooder.getConnectionId() + " closed to " + flooder.getDestination());
} else { } else {
_log.error("wtf, not connected to " + id + " but we were just closed?"); _log.error("not connected to " + id + " but we were just closed?");
} }
} }
public void streamDataReceived(int id, byte data[], int offset, int length) { public void streamDataReceived(int id, byte data[], int offset, int length) {
@ -109,7 +109,7 @@ public class TestSwarm {
if (flooder != null) { if (flooder != null) {
flooder.received(length, value); flooder.received(length, value);
} else { } else {
_log.error("wtf, not connected to " + id + " but we received " + value + "?"); _log.error("not connected to " + id + " but we received " + value + "?");
} }
} }
public void streamConnectedReceived(String dest, int id) { public void streamConnectedReceived(String dest, int id) {
@ -146,7 +146,7 @@ public class TestSwarm {
String serverVersion = _eventHandler.waitForHelloReply(); String serverVersion = _eventHandler.waitForHelloReply();
_log.debug("Hello reply found: " + serverVersion); _log.debug("Hello reply found: " + serverVersion);
if (serverVersion == null) if (serverVersion == null)
throw new IOException("wtf, hello failed?"); throw new IOException("hello failed?");
String req = "SESSION CREATE STYLE=STREAM DESTINATION=" + _destFile + " " + _conOptions + "\n"; String req = "SESSION CREATE STYLE=STREAM DESTINATION=" + _destFile + " " + _conOptions + "\n";
_samOut.write(DataHelper.getUTF8(req)); _samOut.write(DataHelper.getUTF8(req));
_samOut.flush(); _samOut.flush();
@ -301,4 +301,4 @@ public class TestSwarm {
_lastReceivedOn = _context.clock().now(); _lastReceivedOn = _context.clock().now();
} }
} }
} }

View File

@ -1136,7 +1136,7 @@ class Connection {
if (_log.shouldLog(Log.DEBUG)) _log.debug("Inactivity timeout reached, but there are unacked packets"); if (_log.shouldLog(Log.DEBUG)) _log.debug("Inactivity timeout reached, but there are unacked packets");
return; return;
} }
// wtf, this shouldn't have been scheduled // this shouldn't have been scheduled
if (_options.getInactivityTimeout() <= 0) { if (_options.getInactivityTimeout() <= 0) {
if (_log.shouldLog(Log.DEBUG)) _log.debug("Inactivity timeout reached, but there is no timer..."); if (_log.shouldLog(Log.DEBUG)) _log.debug("Inactivity timeout reached, but there is no timer...");
return; return;

View File

@ -140,9 +140,9 @@ class ConnectionDataReceiver implements MessageOutputStream.DataReceiver {
//long sent = System.currentTimeMillis(); //long sent = System.currentTimeMillis();
//if ( (built-before > 5*1000) && (_log.shouldLog(Log.WARN)) ) //if ( (built-before > 5*1000) && (_log.shouldLog(Log.WARN)) )
// _log.warn("wtf, took " + (built-before) + "ms to build a packet: " + packet); // _log.warn(took " + (built-before) + "ms to build a packet: " + packet);
//if ( (sent-built> 5*1000) && (_log.shouldLog(Log.WARN)) ) //if ( (sent-built> 5*1000) && (_log.shouldLog(Log.WARN)) )
// _log.warn("wtf, took " + (sent-built) + "ms to send a packet: " + packet); // _log.warn(took " + (sent-built) + "ms to send a packet: " + packet);
return packet; return packet;
} }

View File

@ -542,7 +542,7 @@ class ConnectionPacketHandler {
} }
} else { } else {
if (_log.shouldLog(Log.WARN)) if (_log.shouldLog(Log.WARN))
_log.warn("Received a packet for the wrong connection? wtf: " _log.warn("Received a packet for the wrong connection? "
+ con + " / " + packet); + con + " / " + packet);
return; return;
} }

View File

@ -177,7 +177,7 @@ class MessageOutputStream extends OutputStream {
} }
long elapsed = _context.clock().now() - begin; long elapsed = _context.clock().now() - begin;
if ( (elapsed > 10*1000) && (_log.shouldLog(Log.INFO)) ) if ( (elapsed > 10*1000) && (_log.shouldLog(Log.INFO)) )
_log.info("wtf, took " + elapsed + "ms to write to the stream?", new Exception("foo")); _log.info("took " + elapsed + "ms to write to the stream?", new Exception("foo"));
throwAnyError(); throwAnyError();
//updateBps(len); //updateBps(len);
} }
@ -374,7 +374,7 @@ class MessageOutputStream extends OutputStream {
long elapsed = _context.clock().now() - begin; long elapsed = _context.clock().now() - begin;
if ( (elapsed > 10*1000) && (_log.shouldLog(Log.DEBUG)) ) if ( (elapsed > 10*1000) && (_log.shouldLog(Log.DEBUG)) )
_log.debug("wtf, took " + elapsed + "ms to flush the stream?\n" + ws, new Exception("bar")); _log.debug("took " + elapsed + "ms to flush the stream?\n" + ws, new Exception("bar"));
throwAnyError(); throwAnyError();
} }

View File

@ -214,7 +214,7 @@ public final class CryptixAESEngine extends AESEngine {
sessionKey.setPreparedKey(key); sessionKey.setPreparedKey(key);
} catch (InvalidKeyException ike) { } catch (InvalidKeyException ike) {
_log.log(Log.CRIT, "Invalid key", ike); _log.log(Log.CRIT, "Invalid key", ike);
throw new IllegalArgumentException("wtf, invalid key? " + ike.getMessage()); throw new IllegalArgumentException("invalid key? " + ike.getMessage());
} }
} }
@ -241,7 +241,7 @@ public final class CryptixAESEngine extends AESEngine {
sessionKey.setPreparedKey(key); sessionKey.setPreparedKey(key);
} catch (InvalidKeyException ike) { } catch (InvalidKeyException ike) {
_log.log(Log.CRIT, "Invalid key", ike); _log.log(Log.CRIT, "Invalid key", ike);
throw new IllegalArgumentException("wtf, invalid key? " + ike.getMessage()); throw new IllegalArgumentException("invalid key? " + ike.getMessage());
} }
} }

View File

@ -493,7 +493,7 @@ riCe6OlAEiNpcc6mMyIYYWFICbrDFTrDR3wXqwc/Jkcx6L5VVWoagpSzbo3yGhc=
return new String(data, "UTF-8"); return new String(data, "UTF-8");
} catch (UnsupportedEncodingException uee) { } catch (UnsupportedEncodingException uee) {
throw new RuntimeException("wtf, your JVM doesnt support utf-8? " + uee.getMessage()); throw new RuntimeException("your JVM doesnt support utf-8? " + uee.getMessage());
} catch (IOException ioe) { } catch (IOException ioe) {
return ""; return "";
} finally { } finally {
@ -532,7 +532,7 @@ riCe6OlAEiNpcc6mMyIYYWFICbrDFTrDR3wXqwc/Jkcx6L5VVWoagpSzbo3yGhc=
return new String(data, "UTF-8"); return new String(data, "UTF-8");
} catch (UnsupportedEncodingException uee) { } catch (UnsupportedEncodingException uee) {
throw new RuntimeException("wtf, your JVM doesnt support utf-8? " + uee.getMessage()); throw new RuntimeException("your JVM doesnt support utf-8? " + uee.getMessage());
} catch (IOException ioe) { } catch (IOException ioe) {
return ""; return "";
} finally { } finally {
@ -746,7 +746,7 @@ riCe6OlAEiNpcc6mMyIYYWFICbrDFTrDR3wXqwc/Jkcx6L5VVWoagpSzbo3yGhc=
try { try {
versionRawBytes = version.getBytes("UTF-8"); versionRawBytes = version.getBytes("UTF-8");
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
throw new RuntimeException("wtf, your JVM doesnt support utf-8? " + e.getMessage()); throw new RuntimeException("your JVM doesnt support utf-8? " + e.getMessage());
} }
System.arraycopy(versionRawBytes, 0, versionHeader, 0, versionRawBytes.length); System.arraycopy(versionRawBytes, 0, versionHeader, 0, versionRawBytes.length);

View File

@ -661,7 +661,7 @@ public class DataHelper {
} }
if (rv < 0) if (rv < 0)
throw new DataFormatException("wtf, fromLong got a negative? " + rv + " numBytes=" + numBytes); throw new DataFormatException("fromLong got a negative? " + rv + " numBytes=" + numBytes);
return rv; return rv;
} }
@ -753,7 +753,7 @@ public class DataHelper {
rv |= src[i] & 0xFF; rv |= src[i] & 0xFF;
} }
if (rv < 0) if (rv < 0)
throw new IllegalArgumentException("wtf, fromLong got a negative? " + rv + ": offset="+ offset +" numBytes="+numBytes); throw new IllegalArgumentException("fromLong got a negative? " + rv + ": offset="+ offset +" numBytes="+numBytes);
return rv; return rv;
} }
@ -774,7 +774,7 @@ public class DataHelper {
rv |= src[i] & 0xFF; rv |= src[i] & 0xFF;
} }
if (rv < 0) if (rv < 0)
throw new IllegalArgumentException("wtf, fromLong got a negative? " + rv + ": offset="+ offset +" numBytes="+numBytes); throw new IllegalArgumentException("fromLong got a negative? " + rv + ": offset="+ offset +" numBytes="+numBytes);
return rv; return rv;
} }

View File

@ -155,7 +155,7 @@ public class SessionConfig extends DataStructureImpl {
} }
byte data[] = getBytes(); byte data[] = getBytes();
if (data == null) { if (data == null) {
//if (_log.shouldLog(Log.WARN)) _log.warn("Bytes could not be found - wtf?"); //if (_log.shouldLog(Log.WARN)) _log.warn("Bytes could not be found");
return false; return false;
} }

View File

@ -432,12 +432,12 @@ public class KBucketSet<T extends SimpleDataStructure> {
if (rv >= 0) { if (rv >= 0) {
return rv; return rv;
} }
_log.error("Key does not fit in any bucket?! WTF!\nKey : [" _log.error("Key does not fit in any bucket?!\nKey : ["
+ DataHelper.toHexString(key.getData()) + "]" + DataHelper.toHexString(key.getData()) + "]"
+ "\nUs : " + _us + "\nUs : " + _us
+ "\nDelta: [" + "\nDelta: ["
+ DataHelper.toHexString(DataHelper.xor(_us.getData(), key.getData())) + DataHelper.toHexString(DataHelper.xor(_us.getData(), key.getData()))
+ "]", new Exception("WTF")); + "]", new Exception("???"));
_log.error(toString()); _log.error(toString());
throw new IllegalStateException("pickBucket returned " + rv); throw new IllegalStateException("pickBucket returned " + rv);
//return -1; //return -1;
@ -588,7 +588,7 @@ public class KBucketSet<T extends SimpleDataStructure> {
} else { } else {
// dont span main bucket boundaries with depth > 1 // dont span main bucket boundaries with depth > 1
if (fixed > 0) if (fixed > 0)
throw new IllegalStateException("WTF " + bucket); throw new IllegalStateException("??? " + bucket);
BigInteger nonz; BigInteger nonz;
if (numNonZero <= 62) { if (numNonZero <= 62) {
// add one to ensure nonzero // add one to ensure nonzero

View File

@ -39,7 +39,7 @@ class Executor implements Runnable {
} }
long time = _context.clock().now() - before; long time = _context.clock().now() - before;
if ( (time > 1000) && (_log.shouldLog(Log.WARN)) ) if ( (time > 1000) && (_log.shouldLog(Log.WARN)) )
_log.warn("wtf, event execution took " + time + ": " + evt); _log.warn("event execution took " + time + ": " + evt);
} }
} }
} }

View File

@ -74,7 +74,7 @@ public class FortunaRandomSource extends RandomSource implements EntropyHarveste
* According to the java docs (http://java.sun.com/j2se/1.4.1/docs/api/java/util/Random.html#nextInt(int)) * According to the java docs (http://java.sun.com/j2se/1.4.1/docs/api/java/util/Random.html#nextInt(int))
* nextInt(n) should return a number between 0 and n (including 0 and excluding n). However, their pseudocode, * nextInt(n) should return a number between 0 and n (including 0 and excluding n). However, their pseudocode,
* as well as sun's, kaffe's, and classpath's implementation INCLUDES NEGATIVE VALUES. * as well as sun's, kaffe's, and classpath's implementation INCLUDES NEGATIVE VALUES.
* WTF. Ok, so we're going to have it return between 0 and n (including 0, excluding n), since * Ok, so we're going to have it return between 0 and n (including 0, excluding n), since
* thats what it has been used for. * thats what it has been used for.
* *
*/ */

View File

@ -58,7 +58,7 @@ public class RandomSource extends SecureRandom implements EntropyHarvester {
* According to the java docs (http://java.sun.com/j2se/1.4.1/docs/api/java/util/Random.html#nextInt(int)) * According to the java docs (http://java.sun.com/j2se/1.4.1/docs/api/java/util/Random.html#nextInt(int))
* nextInt(n) should return a number between 0 and n (including 0 and excluding n). However, their pseudocode, * nextInt(n) should return a number between 0 and n (including 0 and excluding n). However, their pseudocode,
* as well as sun's, kaffe's, and classpath's implementation INCLUDES NEGATIVE VALUES. * as well as sun's, kaffe's, and classpath's implementation INCLUDES NEGATIVE VALUES.
* WTF. Ok, so we're going to have it return between 0 and n (including 0, excluding n), since * Ok, so we're going to have it return between 0 and n (including 0, excluding n), since
* thats what it has been used for. * thats what it has been used for.
* *
* This code unused, see FortunaRandomSource override * This code unused, see FortunaRandomSource override

View File

@ -403,10 +403,10 @@ public class ResettableGZIPInputStream extends InflaterInputStream {
throw new RuntimeException("read=" + read + " expected " + orig.length); throw new RuntimeException("read=" + read + " expected " + orig.length);
for (int j = 0; j < read; j++) { for (int j = 0; j < read; j++) {
if (readBuf[j] != orig[j]) if (readBuf[j] != orig[j])
throw new RuntimeException("wtf, j=" + j + " readBuf=" + readBuf[j] + " orig=" + orig[j]); throw new RuntimeException("j=" + j + " readBuf=" + readBuf[j] + " orig=" + orig[j]);
} }
boolean ok = (-1 == i.read()); boolean ok = (-1 == i.read());
if (!ok) throw new RuntimeException("wtf, not EOF after the data?"); if (!ok) throw new RuntimeException("not EOF after the data?");
//System.out.println("Match ok"); //System.out.println("Match ok");
// try both closing and not // try both closing and not
if ((k % 2) != 0) if ((k % 2) != 0)

View File

@ -170,9 +170,9 @@ public class SimpleScheduler {
_log.debug("Running: " + _timedEvent); _log.debug("Running: " + _timedEvent);
long before = System.currentTimeMillis(); long before = System.currentTimeMillis();
if (_log.shouldLog(Log.WARN) && before < _scheduled - 100) if (_log.shouldLog(Log.WARN) && before < _scheduled - 100)
_log.warn(_name + " wtf, early execution " + (_scheduled - before) + ": " + _timedEvent); _log.warn(_name + " early execution " + (_scheduled - before) + ": " + _timedEvent);
else if (_log.shouldLog(Log.WARN) && before > _scheduled + 1000) else if (_log.shouldLog(Log.WARN) && before > _scheduled + 1000)
_log.warn(" wtf, late execution " + (before - _scheduled) + ": " + _timedEvent + debug()); _log.warn("late execution " + (before - _scheduled) + ": " + _timedEvent + debug());
try { try {
_timedEvent.timeReached(); _timedEvent.timeReached();
} catch (Throwable t) { } catch (Throwable t) {
@ -180,7 +180,7 @@ public class SimpleScheduler {
} }
long time = System.currentTimeMillis() - before; long time = System.currentTimeMillis() - before;
if (time > 1000 && _log.shouldLog(Log.WARN)) if (time > 1000 && _log.shouldLog(Log.WARN))
_log.warn(_name + " wtf, event execution took " + time + ": " + _timedEvent); _log.warn(_name + " event execution took " + time + ": " + _timedEvent);
if (_log.shouldLog(Log.INFO)) { if (_log.shouldLog(Log.INFO)) {
// this call is slow - iterates through a HashMap - // this call is slow - iterates through a HashMap -
// would be better to have a local AtomicLong if we care // would be better to have a local AtomicLong if we care

View File

@ -173,7 +173,7 @@ public class BSkipLevels<K extends Comparable<? super K>, V> extends SkipLevels<
// TODO also check that the level[] array is not out-of-order // TODO also check that the level[] array is not out-of-order
} else { } else {
if (bf.log.shouldLog(Log.WARN)) if (bf.log.shouldLog(Log.WARN))
bf.log.warn("WTF " + this + " i = " + i + " of " + bf.log.warn(this + " i = " + i + " of " +
lps.length + " / " + levels.length + lps.length + " / " + levels.length +
" valid levels but page is zero"); " valid levels but page is zero");
levels[i] = null; levels[i] = null;

View File

@ -202,11 +202,11 @@ public class SkipLevels<K extends Comparable<? super K>, V> implements Flushable
if((bottom.nKeys == 0) && (sl.first != bottom)) { if((bottom.nKeys == 0) && (sl.first != bottom)) {
// from debugging other problems // from debugging other problems
if (res == null) { if (res == null) {
_log.warn("WTF killing with no return value " + print()); _log.warn("killing with no return value " + print());
} else if (res[1] == null) { } else if (res[1] == null) {
_log.warn("WTF killing with no return value 1 " + print()); _log.warn("killing with no return value 1 " + print());
} else if (res[1] != this) { } else if (res[1] != this) {
_log.warn("WTF killing with return value not us " + res[1] + ' ' + print()); _log.warn("killing with return value not us " + res[1] + ' ' + print());
} }
this.killInstance(); this.killInstance();
} }

View File

@ -195,7 +195,7 @@ public class AESInputStream extends FilterInputStream {
throw new IOException("Error decrypting - no data to decrypt"); throw new IOException("Error decrypting - no data to decrypt");
if (_decryptedSize != 0) if (_decryptedSize != 0)
throw new IOException("wtf, decrypted size is not 0? " + _decryptedSize); throw new IOException("decrypted size is not 0? " + _decryptedSize);
_context.aes().decrypt(_encryptedBuf, 0, _encryptedBuf, 0, _key, _lastBlock, BLOCK_SIZE); _context.aes().decrypt(_encryptedBuf, 0, _encryptedBuf, 0, _key, _lastBlock, BLOCK_SIZE);
DataHelper.xor(_encryptedBuf, 0, _lastBlock, 0, _encryptedBuf, 0, BLOCK_SIZE); DataHelper.xor(_encryptedBuf, 0, _lastBlock, 0, _encryptedBuf, 0, BLOCK_SIZE);
@ -467,4 +467,4 @@ public class AESInputStream extends FilterInputStream {
} }
//try { Thread.sleep(5000); } catch (Throwable t) {} //try { Thread.sleep(5000); } catch (Throwable t) {}
} }
} }

View File

@ -61,7 +61,7 @@ public class BandwidthLimitedOutputStream extends FilterOutputStream {
if (src == null) return; if (src == null) return;
if (len <= 0) return; if (len <= 0) return;
if (len + off > src.length) if (len + off > src.length)
throw new IllegalArgumentException("wtf are you thinking? len=" + len throw new IllegalArgumentException("what are you thinking? len=" + len
+ ", off=" + off + ", data=" + src.length); + ", off=" + off + ", data=" + src.length);
_currentRequest = _context.bandwidthLimiter().requestOutbound(len, 0, _peerTarget); _currentRequest = _context.bandwidthLimiter().requestOutbound(len, 0, _peerTarget);