Changeset 8de5609


Ignore:
Timestamp:
Apr 3, 2009 9:42:48 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
3dd5950, 78044756
Parents:
bb05310
Message:
  • Update:
    • Change default to "Download and verify"
    • Change news fetch default to 24h (was 12h)
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java

    rbb05310 r8de5609  
    2222    public static final String DEFAULT_NEWS_URL = "http://complication.i2p/news.xml";
    2323    public static final String PROP_REFRESH_FREQUENCY = "router.newsRefreshFrequency";
    24     public static final String DEFAULT_REFRESH_FREQUENCY = 12*60*60*1000 + "";
     24    public static final String DEFAULT_REFRESH_FREQUENCY = 24*60*60*1000 + "";
    2525    public static final String PROP_UPDATE_POLICY = "router.updatePolicy";
    26     public static final String DEFAULT_UPDATE_POLICY = "notify";
     26    public static final String DEFAULT_UPDATE_POLICY = "download";
    2727    public static final String PROP_SHOULD_PROXY = "router.updateThroughProxy";
    2828    public static final String DEFAULT_SHOULD_PROXY = Boolean.TRUE.toString();
  • apps/routerconsole/java/src/net/i2p/router/web/UpdateHandler.java

    rbb05310 r8de5609  
    167167                    _log.log(Log.CRIT, "Update was VERIFIED, will be installed at next restart");
    168168                    _status = "<b>Update downloaded</b><br />Click Restart to Install";
     169                    if (up.newVersion() != null)
     170                        _status += " Version " + up.newVersion();
    169171                }
    170172            } else {
  • core/java/src/net/i2p/crypto/TrustedUpdate.java

    rbb05310 r8de5609  
    109109    private Log       _log;
    110110    private ArrayList _trustedKeys;
     111    private String _newVersion;
    111112
    112113    /**
     
    128129        _log = _context.logManager().getLog(TrustedUpdate.class);
    129130        _trustedKeys = new ArrayList();
     131        _newVersion = null;
    130132
    131133        String propertyTrustedKeys = context.getProperty(PROP_TRUSTED_KEYS);
     
    380382    }
    381383
     384    /** version in the .sud file, valid only after calling migrateVerified() */
     385    public String newVersion() {
     386        return _newVersion;
     387    }
     388
    382389    /**
    383390     * Verifies that the version of the given signed update file is newer than
     
    391398     */
    392399    public boolean isUpdatedVersion(String currentVersion, String signedFile) {
    393         if (needsUpdate(currentVersion, getVersionString(signedFile)))
    394             return true;
    395         else
    396             return false;
     400        _newVersion = getVersionString(signedFile);
     401        return needsUpdate(currentVersion, getVersionString(signedFile));
    397402    }
    398403
Note: See TracChangeset for help on using the changeset viewer.