On Tuesday 12 August 2008 18:11, [EMAIL PROTECTED] wrote:
> Author: nextgens
> Date: 2008-08-12 17:11:25 +0000 (Tue, 12 Aug 2008)
> New Revision: 21770
> 
> Modified:
>    trunk/freenet/src/freenet/clients/http/FirstTimeWizardToadlet.java
>    trunk/freenet/src/freenet/config/IntOption.java
>    trunk/freenet/src/freenet/config/LongOption.java
> Log:
> Fix the code, strip the "ib" part of config options
> 
> Modified: trunk/freenet/src/freenet/clients/http/FirstTimeWizardToadlet.java
> ===================================================================
> --- trunk/freenet/src/freenet/clients/http/FirstTimeWizardToadlet.java        
2008-08-12 16:39:59 UTC (rev 21769)
> +++ trunk/freenet/src/freenet/clients/http/FirstTimeWizardToadlet.java        
2008-08-12 17:11:25 UTC (rev 21770)
> @@ -315,14 +315,14 @@
>                       int upstreamBWLimit = (bwIndicator != null ? 
bwIndicator.getUpstramMaxBitRate() : -1);
>                       if((bwIndicator != null) && (upstreamBWLimit > 0)) {
>                               int bytes = (upstreamBWLimit / 8) - 1;
> -                             String upstreamBWLimitString = (bytes < 16384 ? 
> "8K" : 
SizeUtil.formatSize(Math.round(bytes / 2)));
> +                             String upstreamBWLimitString = (bytes < 16384 ? 
> "8K" : 
SizeUtil.formatSize(bytes / 2));

Should stripBytes here, no?

>                               
> _setUpstreamBandwidthLimit(upstreamBWLimitString);
>                               Logger.normal(this, "The node has a 
> bandwidthIndicator: it has reported 
upstream="+upstreamBWLimit+ "bits/sec... we will use "+ upstreamBWLimitString 
+" and skip the bandwidth selection step of the wizard.");
>                               
>                               int downstreamBWLimit = 
> bwIndicator.getDownstreamMaxBitRate();
>                               if(downstreamBWLimit > 0) {
>                                       bytes = (downstreamBWLimit / 8) - 1;
> -                                     String downstreamBWLimitString = 
> SizeUtil.formatSize(Math.round(bytes 
* 2/3));
> +                                     String downstreamBWLimitString = 
SizeUtil.stripBytesEtc(SizeUtil.formatSize(bytes * 2/3));
>                                       
> _setDownstreamBandwidthLimit(downstreamBWLimitString);
>                                       Logger.normal(this, "The node has a 
> bandwidthIndicator: it has 
reported downstream="+downstreamBWLimit+ "bits/sec... we will use "+ 
downstreamBWLimitString +" and skip the bandwidth selection step of the 
wizard.");
>                               }
> 

Attachment: pgpQFG9XhKApo.pgp
Description: PGP signature

_______________________________________________
Devl mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to