[freenet-dev] [freenet-cvs] r13347 - trunk/freenet/src/freenet/node

Matthew Toseland toad at amphibian.dyndns.org
Thu May 24 19:31:37 UTC 2007


That's sensible, but don't we do it already?

IMHO the range of circumstances in which we'd want to run UP&P is considerably 
wider than the range of circumstances in which we'd want to run STUN: UP&P 
can quite happily run on every startup (if the user has indicated the LAN is 
safe).

On Wednesday 23 May 2007 23:40, nextgens at freenetproject.org wrote:
> Author: nextgens
> Date: 2007-05-23 22:40:31 +0000 (Wed, 23 May 2007)
> New Revision: 13347
>
> Modified:
>    trunk/freenet/src/freenet/node/IPDetectorPluginManager.java
> Log:
> Done the following:
> 	* Run the external ip detection if no peer is known (to ensure newbies
> publish a correct reference). * Fix a log message (we can't assume that the
> plugin is STUN)
> 	* Add a new log message each time we register a new plugin
>
> Modified: trunk/freenet/src/freenet/node/IPDetectorPluginManager.java
> ===================================================================
> --- trunk/freenet/src/freenet/node/IPDetectorPluginManager.java	2007-05-23
> 22:27:12 UTC (rev 13346) +++
> trunk/freenet/src/freenet/node/IPDetectorPluginManager.java	2007-05-23
> 22:40:31 UTC (rev 13347) @@ -169,6 +169,7 @@
>  			newPlugins[plugins.length] = d;
>  			plugins = newPlugins;
>  		}
> +		if(logMINOR) Logger.minor(this, "Registering a new plugin : " + d);
>  		maybeRun();
>  	}
>
> @@ -352,6 +353,9 @@
>  				if(detector.maybeSymmetric && lastDetectAttemptEndedTime <= 0) // If
> it appears to be an SNAT, do a detection at least once maybeUrgent = true;
>
> +				if(node.peers.myPeers.length == 0 && lastDetectAttemptEndedTime <= 0)
> // We don't have any peer connected yet, we want to publish a "correct"
> reference +					maybeUrgent = true;
> +
>  				if(maybeUrgent) {
>  					if(firstTimeUrgent <= 0)
>  						firstTimeUrgent = now;
> @@ -448,7 +452,7 @@
>  		}
>
>  		public void realRun() {
> -			if(logMINOR) Logger.minor(this, "Running STUN detection");
> +			if(logMINOR) Logger.minor(this, "Running plugin detection");
>  			try {
>  				FredPluginIPDetector[] run = plugins;
>  				Vector v = new Vector();
>
> _______________________________________________
> cvs mailing list
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://emu.freenetproject.org/pipermail/devl/attachments/20070524/b648cab1/attachment.pgp 


More information about the Devl mailing list