Changeset f390831
- Timestamp:
- Apr 1, 2017 2:15:06 PM (4 years ago)
- Branches:
- master
- Children:
- bfc0417
- Parents:
- 5eefb8b2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
apps/i2psnark/java/src/org/klomp/snark/Snark.java
r5eefb8b2 rf390831 239 239 // String indicating main activity 240 240 private volatile String activity = "Not started"; 241 private finallong savedUploaded;241 private long savedUploaded; 242 242 private long _startedTime; 243 243 private static final AtomicInteger __RPCID = new AtomicInteger(); … … 638 638 // TODO: Cache the config-in-mem to compare vs config-on-disk 639 639 // (needed for auto-save to not double-save in some cases) 640 //boolean changed = storage.isChanged() || getUploaded() != savedUploaded; 641 boolean changed = true; 642 if (changed && completeListener != null) 643 completeListener.updateStatus(this); 640 long nowUploaded = getUploaded(); 641 boolean changed = storage.isChanged() || nowUploaded != savedUploaded; 644 642 try { 645 643 storage.close(); … … 648 646 ioe.printStackTrace(); 649 647 } 648 savedUploaded = nowUploaded; 649 if (changed && completeListener != null) 650 completeListener.updateStatus(this); 650 651 } 651 652 if (fast) … … 1290 1291 allChecked = true; 1291 1292 checking = false; 1292 if (storage.isChanged() && completeListener != null) 1293 if (storage.isChanged() && completeListener != null) { 1293 1294 completeListener.updateStatus(this); 1295 // this saved the status, so reset the variables 1296 storage.clearChanged(); 1297 savedUploaded = getUploaded(); 1298 } 1294 1299 } 1295 1300 … … 1300 1305 //storage.close(); 1301 1306 //System.out.println("Completely received: " + torrent); 1302 if (completeListener != null) 1307 if (completeListener != null) { 1303 1308 completeListener.torrentComplete(this); 1309 // this saved the status, so reset the variables 1310 savedUploaded = getUploaded(); 1311 storage.clearChanged(); 1312 } 1304 1313 } 1305 1314 -
apps/i2psnark/java/src/org/klomp/snark/Storage.java
r5eefb8b2 rf390831 304 304 public boolean isChanged() { 305 305 return changed; 306 } 307 308 /** 309 * Clear the storage changed variable 310 * @since 0.9.30 311 */ 312 void clearChanged() { 313 changed = false; 306 314 } 307 315 -
apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java
r5eefb8b2 rf390831 18 18 import java.util.Map; 19 19 import java.util.Properties; 20 import java.util.Set; 20 21 import java.util.SortedSet; 21 22 import java.util.StringTokenizer; … … 234 235 if (PluginStarter.pluginsEnabled(_context)) 235 236 (new I2PAppThread(new PluginStopper(_context), "PluginStopper")).start(); 237 stopAllWebApps(); 236 238 try { 237 239 _server.stop(); … … 1041 1043 } 1042 1044 1045 /** 1046 * Stops all but the root webapp (routerconsole.war) 1047 * In Jetty 9, stopping the server doesn't stop the non-root webapps, 1048 * so we must do it here. 1049 * There should be a better way to do this, possibly by 1050 * making the webapps "managed". 1051 * @since 0.9.30 1052 */ 1053 private void stopAllWebApps() { 1054 Properties props = webAppProperties(_context); 1055 Set<String> keys = props.stringPropertyNames(); 1056 for (String name : keys) { 1057 if (name.startsWith(PREFIX) && name.endsWith(ENABLED)) { 1058 String app = name.substring(PREFIX.length(), name.lastIndexOf(ENABLED)); 1059 if (ROUTERCONSOLE.equals(app)) 1060 continue; 1061 if (WebAppStarter.isWebAppRunning(app)) { 1062 try { 1063 WebAppStarter.stopWebApp(app); 1064 } catch (Throwable t) { t.printStackTrace(); } 1065 } 1066 } 1067 } 1068 1069 } 1070 1043 1071 static class WarFilenameFilter implements FilenameFilter { 1044 1072 private static final WarFilenameFilter _filter = new WarFilenameFilter(); -
core/java/src/net/i2p/data/DataHelper.java
r5eefb8b2 rf390831 47 47 import net.i2p.util.ReusableGZIPOutputStream; 48 48 import net.i2p.util.SecureFileOutputStream; 49 import net.i2p.util.SystemVersion; 49 50 import net.i2p.util.Translate; 50 51 … … 55 56 */ 56 57 public class DataHelper { 58 59 /** See storeProps(). 600-750 ms on RPi. */ 60 private static final boolean SHOULD_SYNC = !(SystemVersion.isAndroid() || SystemVersion.isARM()); 57 61 58 62 /** … … 515 519 out.println(name + "=" + val); 516 520 } 517 out.flush(); 518 fos.getFD().sync(); 521 if (SHOULD_SYNC) { 522 out.flush(); 523 fos.getFD().sync(); 524 } 519 525 out.close(); 520 526 if (out.checkError()) { -
history.txt
r5eefb8b2 rf390831 1 2017-04-01 zzz 2 * Console: Fix stopping of webapps when console stops (ticket #1893) 3 * i2psnark: Only rewrite torrent config file if changed (ticket #1893) 4 * KeyStoreUtil: Reduce log level of expired cert error 5 * Util: Don't sync config writes on Android/ARM (ticket #1893) 6 1 7 2017-03-31 zzz 2 8 * SSU: … … 78 84 - Update to Jetty 9.2.21.v20170120 and Tomcat 8.0.33 (tickets #1512, #1935) 79 85 Fixes jsp compilation on Java 9 (ticket #1870) 86 Fixes InstanceManager warning (ticket #1818) 80 87 We now support servlet API 3.1, JSP API 2.3, and EL API 3.0. 81 88 Breaks the following plugins: bwschedule, i2pbote, i2pcontrol, zzzot -
router/java/src/net/i2p/router/RouterVersion.java
r5eefb8b2 rf390831 19 19 public final static String ID = "Monotone"; 20 20 public final static String VERSION = CoreVersion.VERSION; 21 public final static long BUILD = 1 3;21 public final static long BUILD = 14; 22 22 23 23 /** for example "-test" */
Note: See TracChangeset
for help on using the changeset viewer.