[freenet-cvs] r13519 - trunk/freenet/src/freenet/node

toad at freenetproject.org toad at freenetproject.org
Mon Jun 11 19:32:40 UTC 2007


Author: toad
Date: 2007-06-11 19:32:39 +0000 (Mon, 11 Jun 2007)
New Revision: 13519

Modified:
   trunk/freenet/src/freenet/node/Node.java
Log:
Create NodeUpdaterManager in Node constructor. Necessary for UOM (we must be able to handle the UOMAnnounce messages).

Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java	2007-06-11 19:05:58 UTC (rev 13518)
+++ trunk/freenet/src/freenet/node/Node.java	2007-06-11 19:32:39 UTC (rev 13519)
@@ -441,7 +441,7 @@
 	public int lastVersion;
 	
 	/** NodeUpdater **/
-	public NodeUpdateManager nodeUpdater;
+	public final NodeUpdateManager nodeUpdater;
 	
 	// Things that's needed to keep track of
 	public final PluginManager pluginManager;
@@ -1436,7 +1436,7 @@
 		nodeConfig.finishedInitialization();
 		writeNodeFile();
 		
-		// And finally, Initialize the plugin manager
+		// Initialize the plugin manager
 		Logger.normal(this, "Initializing Plugin Manager");
 		System.out.println("Initializing Plugin Manager");
 		pluginManager = new PluginManager(this);
@@ -1454,6 +1454,16 @@
 		ctx.maxTempLength = 4096;
 		
 		this.arkFetcherContext = ctx;
+		
+		// Node updater support
+		
+		try {
+			nodeUpdater = NodeUpdateManager.maybeCreate(this, config);
+		} catch (InvalidConfigValueException e) {
+			e.printStackTrace();
+			throw new NodeInitException(EXIT_COULD_NOT_START_UPDATER, "Could not create Updater: "+e);
+		}
+		
 		Logger.normal(this, "Node constructor completed");
 		System.out.println("Node constructor completed");
 	}
@@ -1489,7 +1499,6 @@
 
 		// Node Updater
 		try{
-			nodeUpdater = NodeUpdateManager.maybeCreate(this, config);
 			Logger.normal(this, "Starting the node updater");
 			nodeUpdater.start();
 		}catch (Exception e) {




More information about the cvs mailing list