Changeset 4615fce


Ignore:
Timestamp:
Dec 16, 2016 5:56:18 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
6093f26
Parents:
328f544
Message:

Update: Register blocklist version with update manager

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/update/ConsoleUpdateManager.java

    r328f544 r4615fce  
    143143        notifyInstalled(ROUTER_SIGNED_SU3, "", RouterVersion.VERSION);
    144144        notifyInstalled(ROUTER_DEV_SU3, "", RouterVersion.FULL_VERSION);
     145        String blist = _context.getProperty(NewsFetcher.PROP_BLOCKLIST_TIME);
     146        if (blist != null)
     147            notifyInstalled(BLOCKLIST, "", blist);
    145148        // hack to init from the current news file... do this before we register Updaters
    146149        // This will not kick off any Updaters as none are yet registered
     
    790793                                          Map<UpdateMethod, List<URI>> sourceMap,
    791794                                          String newVersion, String minVersion) {
    792         if (type == NEWS || type == NEWS_SU3) {
     795        if (type == NEWS || type == NEWS_SU3 || type == BLOCKLIST) {
    793796            // shortcut
    794797            notifyInstalled(type, "", newVersion);
  • apps/routerconsole/java/src/net/i2p/router/update/NewsFetcher.java

    r328f544 r4615fce  
    7878
    7979    private static final String TEMP_NEWS_FILE = "news.xml.temp";
    80     private static final String PROP_BLOCKLIST_TIME = "router.blocklistVersion";
     80    static final String PROP_BLOCKLIST_TIME = "router.blocklistVersion";
    8181    private static final String BLOCKLIST_DIR = "docs/feed/blocklist";
    8282    private static final String BLOCKLIST_FILE = "blocklist.txt";
     
    712712        if (!fail) {
    713713            f.setLastModified(ble.updated);
    714             _context.router().saveConfig(PROP_BLOCKLIST_TIME, Long.toString(ble.updated));
     714            String upd = Long.toString(ble.updated);
     715            _context.router().saveConfig(PROP_BLOCKLIST_TIME, upd);
     716            _mgr.notifyVersionAvailable(this, _currentURI, BLOCKLIST, "", HTTP,
     717                                        null, upd, "");
    715718        }
    716719        if (_log.shouldWarn())
  • core/java/src/net/i2p/update/UpdateType.java

    r328f544 r4615fce  
    1515    /** unused */
    1616    GEOIP,
    17     /** unused */
    1817    BLOCKLIST,
    1918    /** unused */
Note: See TracChangeset for help on using the changeset viewer.