On Friday 14 November 2008 00:36, [EMAIL PROTECTED] wrote:
> Author: xor
> Date: 2008-11-14 00:36:56 +0000 (Fri, 14 Nov 2008)
> New Revision: 23550
>
> Modified:
> trunk/plugins/WoT/introduction/IntroductionServer.java
> Log:
> Reflect interface changes.
>
> Modified: trunk/plugins/WoT/introduction/IntroductionServer.java
> ===================================================================
> --- trunk/plugins/WoT/introduction/IntroductionServer.java 2008-11-14
00:36:15 UTC (rev 23549)
> +++ trunk/plugins/WoT/introduction/IntroductionServer.java 2008-11-14
00:36:56 UTC (rev 23550)
> @@ -16,6 +16,7 @@
> import plugins.WoT.Identity;
> import plugins.WoT.IdentityFetcher;
> import plugins.WoT.OwnIdentity;
> +import plugins.WoT.introduction.captcha.CaptchaFactory1;
>
> import com.db4o.ObjectContainer;
> import com.db4o.ObjectSet;
> @@ -203,7 +204,7 @@
> OutputStream os = tempB.getOutputStream();
>
> try {
> - IntroductionPuzzle p =
> mPuzzleFactories[(int)(Math.random() * 100) %
mPuzzleFactories.length].generatePuzzle();
> + IntroductionPuzzle p =
> mPuzzleFactories[(int)(Math.random() * 100) %
mPuzzleFactories.length].generatePuzzle(db, identity);You should really get rid of this ugliness (random()*100 % something) ... > p.exportToXML(os); > os.close(); os = null; > tempB.setReadOnly(); > @@ -250,7 +251,8 @@ > OwnIdentity puzzleOwner = (OwnIdentity)p.getInserter(); > Identity newIdentity = > Identity.importIntroductionFromXML(db, mIdentityFetcher, result.asBucket().getInputStream()); > puzzleOwner.setTrust(db, newIdentity, (byte)0, null); > /* FIXME: is 0 the proper trust for newly imported identities? */ > - db.delete(p); > + p.setSolved(); > + db.store(p); > db.commit(); > > state.cancel(); /* FIXME: is this necessary */ > > _______________________________________________ > cvs mailing list > [EMAIL PROTECTED] > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs > >
pgpOU82eW04zO.pgp
Description: PGP signature
_______________________________________________ Devl mailing list [email protected] http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
