* toad at freenetproject.org <toad at freenetproject.org> [2008-08-01 18:29:29]:

> Author: toad
> Date: 2008-08-01 18:29:28 +0000 (Fri, 01 Aug 2008)
> New Revision: 21563
> 
> Modified:
>    trunk/freenet/src/freenet/node/updater/UpdateOverMandatoryManager.java
> Log:
> Logging
> 
> Modified: 
> trunk/freenet/src/freenet/node/updater/UpdateOverMandatoryManager.java
> ===================================================================
> --- trunk/freenet/src/freenet/node/updater/UpdateOverMandatoryManager.java    
> 2008-08-01 18:11:52 UTC (rev 21562)
> +++ trunk/freenet/src/freenet/node/updater/UpdateOverMandatoryManager.java    
> 2008-08-01 18:29:28 UTC (rev 21563)
> @@ -211,7 +211,7 @@
>               
>               long now = System.currentTimeMillis();
>               long whenToTakeOverTheNormalUpdater = 
> updateManager.getStartedFetchingNextMainJarTimestamp() + GRACE_TIME;
> -             boolean isOutdated = updateManager.node.isOudated();
> +             final boolean isOutdated = updateManager.node.isOudated();
>               // if the new build is self-mandatory or if the "normal" 
> updater has been trying to update for more than one hour
>               Logger.normal(this, "We received a valid UOMAnnounce : 
> (isOutdated="+isOutdated+" version="+mainJarVersion +" 
> whenToTakeOverTheNormalUpdater="+TimeUtil.formatTime(whenToTakeOverTheNormalUpdater-now)+')');
>               if(mainJarVersion > Version.buildNumber() && mainJarFileLength 
> > 0 &&
> @@ -249,6 +249,10 @@
>                                               if(updateManager.isBlown()) 
> return;
>                                               if(!updateManager.isEnabled()) 
> return;
>                                               
> if(updateManager.hasNewMainJar()) return;
> +                                             if(!isOutdated) {
> +                                                     Logger.error(this, "The 
> update process seems to have been stuck for over an hour; let's switch to 
> UoM! SHOULD NOT HAPPEN!");
> +                                                     System.out.println("The 
> update process seems to have been stuck for over an hour; let's switch to 
> UoM! SHOULD NOT HAPPEN!");
> +                                             }
>                                               maybeRequestMainJar();
>                                       }

Does it make sense to log one hour later the status of one hour ago?
imho you should refresh the value of isOudated in order to prevent
misleading messages from being logged.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080802/bf2f63cb/attachment.pgp>

Reply via email to