[freenet-cvs] r18929 - in trunk/plugins: HelloWorld Librarian MDNSDiscovery SNMP TestGallery XMLLibrarian

nextgens at freenetproject.org nextgens at freenetproject.org
Thu Apr 3 05:59:44 UTC 2008


Author: nextgens
Date: 2008-04-03 05:59:44 +0000 (Thu, 03 Apr 2008)
New Revision: 18929

Modified:
   trunk/plugins/HelloWorld/HelloWorld.java
   trunk/plugins/Librarian/Librarian.java
   trunk/plugins/MDNSDiscovery/MDNSDiscovery.java
   trunk/plugins/SNMP/SNMP.java
   trunk/plugins/TestGallery/TestGallery.java
   trunk/plugins/XMLLibrarian/XMLLibrarian.java
Log:
synchronization fixes in plugins

Modified: trunk/plugins/HelloWorld/HelloWorld.java
===================================================================
--- trunk/plugins/HelloWorld/HelloWorld.java	2008-04-03 03:32:46 UTC (rev 18928)
+++ trunk/plugins/HelloWorld/HelloWorld.java	2008-04-03 05:59:44 UTC (rev 18929)
@@ -6,7 +6,7 @@
 
 
 public class HelloWorld implements FredPlugin {
-	boolean goon = true;
+	private volatile boolean goon = true;
 	PluginRespirator pr;
 
 	public void terminate() {

Modified: trunk/plugins/Librarian/Librarian.java
===================================================================
--- trunk/plugins/Librarian/Librarian.java	2008-04-03 03:32:46 UTC (rev 18928)
+++ trunk/plugins/Librarian/Librarian.java	2008-04-03 05:59:44 UTC (rev 18929)
@@ -24,7 +24,7 @@
 	
 	private static final String DEFAULT_INDEX_URI = "USK at 7H66rhYmxIFgMyw5Dl11JazXGHPhp7dSN7WMa1pbtEo,jQHUQUPTkeRcjmjgrc7t5cDRdDkK3uKkrSzuw5CO9uk,AQACAAE/ENTRY.POINT/11/librarian.idx";
 	
-	boolean goon = true;
+	private volatile boolean goon = true;
 	Random rnd = new Random();
 	PluginRespirator pr;
 	private static final String plugName = "Librarian";

Modified: trunk/plugins/MDNSDiscovery/MDNSDiscovery.java
===================================================================
--- trunk/plugins/MDNSDiscovery/MDNSDiscovery.java	2008-04-03 03:32:46 UTC (rev 18928)
+++ trunk/plugins/MDNSDiscovery/MDNSDiscovery.java	2008-04-03 05:59:44 UTC (rev 18929)
@@ -32,7 +32,7 @@
  */
 public class MDNSDiscovery implements FredPlugin, FredPluginHTTP {
 	public static String freenetServiceType = "_freenet._udp.local.";
-	private boolean goon = true;
+	private volatile  boolean goon = true;
 	private JmDNS jmdns;
 	private Config nodeConfig;
 	private LinkedList ourAdvertisedServices, ourDisabledServices, foundNodes;
@@ -44,7 +44,7 @@
 	public synchronized void terminate() {
 		jmdns.close();
 		goon = false;
-		notify();
+		notifyAll();
 	}
 
 	public void runPlugin(PluginRespirator pr) {

Modified: trunk/plugins/SNMP/SNMP.java
===================================================================
--- trunk/plugins/SNMP/SNMP.java	2008-04-03 03:32:46 UTC (rev 18928)
+++ trunk/plugins/SNMP/SNMP.java	2008-04-03 05:59:44 UTC (rev 18929)
@@ -7,7 +7,7 @@
 
 
 public class SNMP implements FredPlugin{
-	boolean goon=true;
+	private volatile boolean goon=true;
 	PluginRespirator pr;
 	private int port;
 	private String bindto;

Modified: trunk/plugins/TestGallery/TestGallery.java
===================================================================
--- trunk/plugins/TestGallery/TestGallery.java	2008-04-03 03:32:46 UTC (rev 18928)
+++ trunk/plugins/TestGallery/TestGallery.java	2008-04-03 05:59:44 UTC (rev 18929)
@@ -15,7 +15,7 @@
 public class TestGallery implements FredPlugin, FredPluginHTTP, FredPluginThreadless {
 	
 	private final static String DEFAULT_GALLERY_URI = "CHK at sTcjGeT~bWxycEvhidh7QYh9J9fBT6YjiXrfkzsC5fQ,~dt~6lS7idVfF09oqnzMI~nXo8V-HN4T6Y7FisfyWDU,AAEA--8";
-	boolean goon = true;
+	private volatile boolean goon = true;
 	
 	Random rnd = new Random();
 	PluginRespirator pr;

Modified: trunk/plugins/XMLLibrarian/XMLLibrarian.java
===================================================================
--- trunk/plugins/XMLLibrarian/XMLLibrarian.java	2008-04-03 03:32:46 UTC (rev 18928)
+++ trunk/plugins/XMLLibrarian/XMLLibrarian.java	2008-04-03 05:59:44 UTC (rev 18929)
@@ -82,7 +82,7 @@
 	private int version = 14;
 	private String configfile = "XMLLibrarian.xml";
 	private  String DEFAULT_FILE = "index.xml";
-	boolean goon = true;
+	private volatile boolean goon = true;
 	private PluginRespirator pr;
 	private final String plugName = "XMLLibrarian "+version;
 	private String word ;




More information about the cvs mailing list