Author: nextgens
Date: 2006-07-30 19:23:10 +0000 (Sun, 30 Jul 2006)
New Revision: 9828

Modified:
   trunk/freenet/src/freenet/node/updater/NodeUpdater.java
   trunk/freenet/src/freenet/node/updater/UpdaterEnabledCallback.java
Log:
fixes FuriousRage's NPE

Modified: trunk/freenet/src/freenet/node/updater/NodeUpdater.java
===================================================================
--- trunk/freenet/src/freenet/node/updater/NodeUpdater.java     2006-07-30 
19:08:29 UTC (rev 9827)
+++ trunk/freenet/src/freenet/node/updater/NodeUpdater.java     2006-07-30 
19:23:10 UTC (rev 9828)
@@ -35,6 +35,9 @@
 import freenet.support.io.ArrayBucket;

 public class NodeUpdater implements ClientCallback, USKCallback {
+       public final static String UPDATE_URI = "freenet:USK at 
SIDKS6l-eOU8IQqDo03d~3qqBd-69WG60aDgg4nWqss,CPFqYi95Is3GwzAdAKtAuFMCXDZFFWC3~uPoidCD67s,AQABAAE/update/"+Version.buildNumber()+"/";
+       public final static String REVOCATION_URI = "freenet:SSK at 
VOfCZVTYPaatJ~eB~4lu2cPrWEmGyt4bfbB1v15Z6qQ,B6EynLhm7QE0se~rMgWWhl7wh3rFWjxJsEUcyohAm8A,AQABAAE/revoked/";
+       
        private FetcherContext ctx;
        private FetcherContext ctxRevocation;
        private FetchResult result;
@@ -531,17 +534,15 @@
                                new AutoUpdateAllowedCallback(node));
                boolean autoUpdateAllowed = 
updaterConfig.getBoolean("autoupdate");

-               updaterConfig.register("URI",
-                               "freenet:USK at 
SIDKS6l-eOU8IQqDo03d~3qqBd-69WG60aDgg4nWqss,CPFqYi95Is3GwzAdAKtAuFMCXDZFFWC3~uPoidCD67s,AQABAAE/update/"+Version.buildNumber()+"/",
-                               3, true, "Where should the node look for 
updates?",
+               updaterConfig.register("URI", NodeUpdater.UPDATE_URI, 3,
+                               true, "Where should the node look for updates?",
                                "Where should the node look for updates?",
                                new UpdateURICallback(node));

                String URI = updaterConfig.getString("URI");


-               updaterConfig.register("revocationURI",
-                               "freenet:SSK at 
VOfCZVTYPaatJ~eB~4lu2cPrWEmGyt4bfbB1v15Z6qQ,B6EynLhm7QE0se~rMgWWhl7wh3rFWjxJsEUcyohAm8A,AQABAAE/revoked/",
+               updaterConfig.register("revocationURI", 
NodeUpdater.REVOCATION_URI,
                                3, true, "Where should the node look for 
revocation ?",
                                "Where should the node look for revocation ?",
                                new UpdateRevocationURICallback(node));

Modified: trunk/freenet/src/freenet/node/updater/UpdaterEnabledCallback.java
===================================================================
--- trunk/freenet/src/freenet/node/updater/UpdaterEnabledCallback.java  
2006-07-30 19:08:29 UTC (rev 9827)
+++ trunk/freenet/src/freenet/node/updater/UpdaterEnabledCallback.java  
2006-07-30 19:23:10 UTC (rev 9828)
@@ -3,7 +3,6 @@
 import freenet.config.BooleanCallback;
 import freenet.config.Config;
 import freenet.config.InvalidConfigValueException;
-import freenet.config.SubConfig;
 import freenet.keys.FreenetURI;
 import freenet.node.Node;
 import freenet.support.Logger;
@@ -30,10 +29,9 @@
                        if(val == get()) return;
                        if(val){
                                try{
-                                       SubConfig sc = 
nodeConfig.get("node.updater");
                                        if(node.nodeUpdater != null)
                                                node.nodeUpdater.kill();
-                                       node.nodeUpdater = new NodeUpdater(node 
, sc.getBoolean("autoupdate"), new FreenetURI(sc.getString("URI")), new 
FreenetURI(sc.getString("revocationURI")));
+                                       node.nodeUpdater = new NodeUpdater(node 
, false, new FreenetURI(NodeUpdater.UPDATE_URI), new 
FreenetURI(NodeUpdater.REVOCATION_URI));
                                        Logger.normal(this, "Starting up the 
node updater");
                                }catch (Exception e){
                                        Logger.error(this, "unable to start the 
node updater up "+e);


Reply via email to