2006-09-26 Complication

* Take back another inadverent logging change in NTCPConnection
This commit is contained in:
complication
2006-09-27 04:44:13 +00:00
committed by zzz
parent 0a240a4436
commit 32a579e480
2 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,7 @@
$Id: history.txt,v 1.526 2006-09-26 23:02:13 complication Exp $
$Id: history.txt,v 1.527 2006-09-26 23:31:34 complication Exp $
2006-09-26 Complication
* Take back another inadverent logging change in NTCPConnection
2006-09-26 Complication
* Take back an accidental log level change

View File

@ -1011,11 +1011,10 @@ public class NTCPConnection implements FIFOBandwidthLimiter.CompleteListener {
private void sendMeta() {
byte encrypted[] = new byte[_meta.length];
long ts = _context.clock().now()/1000;
synchronized (_meta) {
_context.random().nextBytes(_meta); // randomize the uninterpreted, then overwrite w/ data
DataHelper.toLong(_meta, 0, 2, 0);
DataHelper.toLong(_meta, 2, 4, ts);
DataHelper.toLong(_meta, 2, 4, _context.clock().now()/1000);
Adler32 crc = new Adler32();
crc.update(_meta, 0, _meta.length-4);
DataHelper.toLong(_meta, _meta.length-4, 4, crc.getValue());
@ -1024,7 +1023,7 @@ public class NTCPConnection implements FIFOBandwidthLimiter.CompleteListener {
System.arraycopy(encrypted, encrypted.length-16, _prevWriteEnd, 0, _prevWriteEnd.length);
// perhaps this should skip the bw limiter to reduce clock skew issues?
if (_log.shouldLog(Log.DEBUG))
_log.debug("Sending NTCP metadata with timestamp " + ts);
_log.debug("Sending NTCP metadata");
_sendingMeta = true;
_transport.getPumper().wantsWrite(this, encrypted);
// enqueueInfoMessage(); // this often?