Author: xor
Date: 2008-11-13 17:11:31 +0000 (Thu, 13 Nov 2008)
New Revision: 23525

Modified:
   trunk/plugins/WoT/introduction/IntroductionServer.java
Log:
Create identities as late as possible.

Modified: trunk/plugins/WoT/introduction/IntroductionServer.java
===================================================================
--- trunk/plugins/WoT/introduction/IntroductionServer.java      2008-11-13 
17:03:43 UTC (rev 23524)
+++ trunk/plugins/WoT/introduction/IntroductionServer.java      2008-11-13 
17:11:31 UTC (rev 23525)
@@ -246,17 +246,16 @@
 
                try {
                        db.commit();
-                       Identity newIdentity = 
Identity.importIntroductionFromXML(db, mIdentityFetcher, 
result.asBucket().getInputStream());
                        IntroductionPuzzle p = 
IntroductionPuzzle.getBySolutionURI(db, state.getURI());
                        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);
                        db.commit();
                
                        state.cancel(); /* FIXME: is this necessary */ 
                        mRequests.remove(state);
-               } catch (Exception e) {
-                       db.rollback(); /* FIXME: toad: is this safe or might 
some other thread get active and start a transaction which will be interrupted 
by this? */ 
+               } catch (Exception e) { 
                        Logger.error(this, "Parsing failed for "+ 
state.getURI(), e);
                }
        }

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

Reply via email to