Changeset e64ad7c
- Timestamp:
- Aug 26, 2018 3:13:49 PM (2 years ago)
- Branches:
- master
- Children:
- c9002b32, f6c4535
- Parents:
- 1f92232
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
apps/addressbook/java/src/net/i2p/addressbook/Daemon.java
r1f92232 re64ad7c 177 177 NamingService publishedNS, AddressBook addressbook, 178 178 Iterator<Map.Entry<String, HostTxtEntry>> iter, Log log) { 179 long start = System.currentTimeMillis();179 long start = DEBUG ? System.currentTimeMillis() : 0; 180 180 int old = 0, nnew = 0, invalid = 0, conflict = 0, total = 0; 181 181 int deleted = 0; -
apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigAdvancedHandler.java
r1f92232 re64ad7c 108 108 if (_ff.equals("false") || _ff.equals("true")) { 109 109 FloodfillNetworkDatabaseFacade fndf = (FloodfillNetworkDatabaseFacade) _context.netDb(); 110 boolean wasFF = fndf.floodfillEnabled();111 110 boolean isFF = _ff.equals("true"); 112 111 // this will rebuild the RI, log in the event log, etc. -
apps/streaming/java/src/net/i2p/client/streaming/impl/PacketHandler.java
r1f92232 re64ad7c 282 282 if (_log.shouldLog(Log.INFO)) 283 283 _log.info("Received additional packet w/o SendStreamID after the syn on " + con + ": " + packet); 284 receiveKnownCon(con, packet);285 return;286 284 } else { 287 285 if (_log.shouldLog(Log.WARN)) 288 286 _log.warn("hrmph, received while ack of syn was in flight on " + con + ": " + packet + " acked: " + con.getAckedPackets()); 289 287 // allow unlimited packets without a SendStreamID for now 290 receiveKnownCon(con, packet);291 return;292 }288 } 289 receiveKnownCon(con, packet); 290 return; 293 291 } 294 292 } else { … … 300 298 } 301 299 // don't bother sending reset 300 // TODO send reset if recent && has data? 302 301 packet.releasePayload(); 303 302 return; -
apps/susimail/src/src/i2p/susi/webmail/WebMail.java
r1f92232 re64ad7c 2623 2623 ArrayList<String> bccList = new ArrayList<String>(); 2624 2624 2625 String sender = null;2626 if (from != null && Mail.validateAddress(from)) {2627 sender = Mail.getAddress( from );2628 }2629 2630 2625 // no validation 2631 2626 Mail.getRecipientsFromList( toList, to, ok ); … … 2732 2727 String[] bcc = draft.getBcc(); 2733 2728 String subject = draft.subject; 2734 MailPart text = draft.getPart();2735 2729 List<Attachment> attachments = draft.getAttachments(); 2736 2730 … … 2973 2967 I2PAppContext ctx = I2PAppContext.getGlobalContext(); 2974 2968 b64UIDL = Base64.encode(ctx.random().nextLong() + "drft"); 2975 } else { 2969 } 2970 2976 2971 MailCache drafts = sessionObject.caches.get(DIR_DRAFTS); 2977 2972 if (drafts == null) { … … 3008 3003 out.println("<input type=\"hidden\" name=\"" + DRAFT_EXISTS + "\" value=\"1\">"); 3009 3004 } 3010 }3011 3005 3012 3006 boolean fixed = Boolean.parseBoolean(Config.getProperty( CONFIG_SENDER_FIXED, "true" )); -
core/java/src/gnu/crypto/prng/FortunaStandalone.java
r1f92232 re64ad7c 110 110 int pool0Count; 111 111 int reseedCount; 112 static long refillCount = 0;113 static long lastRefill = System.currentTimeMillis();112 //static long refillCount = 0; 113 //static long lastRefill = System.currentTimeMillis(); 114 114 115 115 public static final String SEED = "gnu.crypto.prng.fortuna.seed"; … … 127 127 allocBuffer(); 128 128 } 129 130 /** Unused, see AsyncFortunaStandalone */ 129 131 protected void allocBuffer() { 130 132 buffer = new byte[4*1024*1024]; //256]; // larger buffer to reduce churn 131 133 } 132 134 135 /** Unused, see AsyncFortunaStandalone */ 133 136 public void seed(byte val[]) { 134 137 Map<String, byte[]> props = Collections.singletonMap(SEED, val); … … 146 149 } 147 150 151 /** Unused, see AsyncFortunaStandalone */ 148 152 public void fillBlock() 149 153 { 150 long start = System.currentTimeMillis();154 //long start = System.currentTimeMillis(); 151 155 if (pool0Count >= MIN_POOL_SIZE 152 156 && System.currentTimeMillis() - lastReseed > 100) … … 163 167 } 164 168 generator.nextBytes(buffer); 165 long now = System.currentTimeMillis();166 long diff = now-lastRefill;167 lastRefill = now;168 long refillTime = now-start;169 System.out.println("Refilling " + (++refillCount) + " after " + diff + " for the PRNG took " + refillTime);169 //long now = System.currentTimeMillis(); 170 //long diff = now-lastRefill; 171 //lastRefill = now; 172 //long refillTime = now-start; 173 //System.out.println("Refilling " + (++refillCount) + " after " + diff + " for the PRNG took " + refillTime); 170 174 } 171 175 -
core/java/src/net/i2p/client/naming/MetaNamingService.java
r1f92232 re64ad7c 214 214 public void export(Writer out, Properties options) throws IOException { 215 215 for (NamingService ns : _services) { 216 export(out, options);216 ns.export(out, options); 217 217 } 218 218 } -
router/java/src/net/i2p/router/Blocklist.java
r1f92232 re64ad7c 423 423 // end1--; 424 424 //} 425 if (end1 <= 0)426 return null; // blank425 //if (end1 <= 0) 426 // return null; // blank 427 427 int start2 = -1; 428 428 int mask = -1; -
router/java/src/net/i2p/router/networkdb/kademlia/StoreJob.java
r1f92232 re64ad7c 496 496 497 497 if (_log.shouldLog(Log.DEBUG)) { 498 if (shouldEncrypt) 499 _log.debug("sending encrypted store to " + peer.getIdentity().getHash() + " through " + outTunnel + ": " + sent); 500 else 501 _log.debug("sending store to " + peer.getIdentity().getHash() + " through " + outTunnel + ": " + sent); 502 //_log.debug("Expiration is " + new Date(sent.getMessageExpiration())); 498 _log.debug("sending encrypted store to " + peer.getIdentity().getHash() + " through " + outTunnel + ": " + sent); 503 499 } 504 500 getContext().messageRegistry().registerPending(selector, onReply, onFail); -
router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java
r1f92232 re64ad7c 982 982 Block block = new NTCP2Payload.RIBlock(ri, shouldFlood); 983 983 int size = block.getTotalLength(); 984 if (size > BUFFER_SIZE) {984 if (size + NTCP2Payload.BLOCK_HEADER_SIZE > BUFFER_SIZE) { 985 985 if (_log.shouldWarn()) 986 986 _log.warn("RI too big: " + ri); … … 994 994 //block = new NTCP2Payload.PaddingBlock(_context, padlen); 995 995 block = new NTCP2Payload.PaddingBlock(padlen); 996 size += block.getTotalLength();997 996 blocks.add(block); 998 997 } … … 1041 1040 //block = new NTCP2Payload.PaddingBlock(_context, padlen); 1042 1041 block = new NTCP2Payload.PaddingBlock(padlen); 1043 plen += block.getTotalLength();1044 1042 blocks.add(block); 1045 1043 } -
router/java/src/net/i2p/router/transport/udp/PeerState.java
r1f92232 re64ad7c 1905 1905 _context.statManager().addRateData("udp.sendConfirmVolley", numSends); 1906 1906 _transport.succeeded(state); 1907 int numFragments = state.getFragmentCount();1908 1907 // this adjusts the rtt/rto/window/etc 1909 1908 messageACKed(state.getMessageSize(), state.getLifetime(), numSends); -
router/java/src/net/i2p/router/tunnel/FragmentedMessage.java
r1f92232 re64ad7c 88 88 if (fragmentNum > _highFragmentNum) 89 89 _highFragmentNum = fragmentNum; 90 if (isLast && fragmentNum <= 0) {91 if (_log.shouldLog(Log.ERROR))92 _log.error("hmm, isLast and fragmentNum=" + fragmentNum + " for message " + _messageId);93 return false;94 }95 90 return true; 96 91 }
Note: See TracChangeset
for help on using the changeset viewer.