[freenet-dev] [freenet-cvs] r18092 - in trunk/freenet/src/freenet: l10n node support/io

Matthew Toseland toad at amphibian.dyndns.org
Fri Feb 22 13:16:04 UTC 2008


Please key this on HAS_ENOUGH_NICE_LEVELS not HAS_PLENTY_NICE_LEVELS. IMHO we 
don't need 10; I've only used 5. Also I suggest you mention explicitly how to 
solve the problem: set PRIORITY to 15 or less.

On Thursday 21 February 2008 03:57, nextgens at freenetproject.org wrote:
> Author: nextgens
> Date: 2008-02-21 03:57:28 +0000 (Thu, 21 Feb 2008)
> New Revision: 18092
> 
> Modified:
>    trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
>    trunk/freenet/src/freenet/node/Node.java
>    trunk/freenet/src/freenet/support/io/NativeThread.java
> Log:
> Create a new UserAlert: NotEnoughNiceLevels
> 
> Modified: trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
> ===================================================================
> --- trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties	2008-02-21 
03:28:09 UTC (rev 18091)
> +++ trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties	2008-02-21 
03:57:28 UTC (rev 18092)
> @@ -707,6 +707,8 @@
>  NodeUpdateManager.updateFailedTitle=Update Failed!
>  NodeUpdateManager.updateURI=Where should the node look for updates?
>  NodeUpdateManager.updateURILong=Where should the node look for updates?
> +NotEnoughNiceLevelsUserAlert.title=Not enough Nice levels available!
> +NotEnoughNiceLevelsUserAlert.content=Your node has detected that it is 
running at a high nice level. It can't perform well if they aren't enough 
levels available. Please lower the nice level you're node is running at (Look 
for PRIORITY in the run.sh file)! Currently your node has ${available} levels 
to play with whereas it would need ${required}.
>  OpennetConnectionsToadlet.successTimeTitle=Last success
>  OpennetConnectionsToadlet.successTime=Last time there was a successful CHK 
fetch from the node
>  OpennetConnectionsToadlet.fullTitle=${counts} Strangers (Untrusted Peers) 
of ${name}
> 
> Modified: trunk/freenet/src/freenet/node/Node.java
> ===================================================================
> --- trunk/freenet/src/freenet/node/Node.java	2008-02-21 03:28:09 UTC (rev 
18091)
> +++ trunk/freenet/src/freenet/node/Node.java	2008-02-21 03:57:28 UTC (rev 
18092)
> @@ -79,6 +79,7 @@
>  import freenet.node.useralerts.ClockProblemDetectedUserAlert;
>  import freenet.node.useralerts.ExtOldAgeUserAlert;
>  import freenet.node.useralerts.MeaningfulNodeNameUserAlert;
> +import freenet.node.useralerts.NotEnoughNiceLevelsUserAlert;
>  import freenet.node.useralerts.OpennetUserAlert;
>  import freenet.node.useralerts.SimpleUserAlert;
>  import freenet.node.useralerts.TimeSkewDetectedUserAlert;
> @@ -115,6 +116,7 @@
>  import freenet.support.io.ArrayBucketFactory;
>  import freenet.support.io.Closer;
>  import freenet.support.io.FileUtil;
> +import freenet.support.io.NativeThread;
>  import freenet.support.transport.ip.HostnameSyntaxException;
>  
>  /**
> @@ -1704,6 +1706,9 @@
>  		else if(NodeStarter.extBuildNumber == -1)
>  			clientCore.alerts.register(new ExtOldAgeUserAlert());
>  		
> +		if(!NativeThread.HAS_PLENTY_NICE_LEVELS)
> +			clientCore.alerts.register(new NotEnoughNiceLevelsUserAlert());
> +		
>  		clientCore.alerts.register(new OpennetUserAlert(this));
>  		
>  		this.clientCore.start(config);
> 
> Modified: trunk/freenet/src/freenet/support/io/NativeThread.java
> ===================================================================
> --- trunk/freenet/src/freenet/support/io/NativeThread.java	2008-02-21 
03:28:09 UTC (rev 18091)
> +++ trunk/freenet/src/freenet/support/io/NativeThread.java	2008-02-21 
03:57:28 UTC (rev 18092)
> @@ -60,6 +60,7 @@
>  			NATIVE_PRIORITY_RANGE = 19;
>  			HAS_THREE_NICE_LEVELS = true;
>  			HAS_ENOUGH_NICE_LEVELS = true;
> +			HAS_PLENTY_NICE_LEVELS = true;
>  		}
>  		Logger.minor(NativeThread.class, "Run init(): _loadNative 
= "+_loadNative);
>  	}
> 
> _______________________________________________
> 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/20080222/f69aa369/attachment.pgp 


More information about the Devl mailing list