Author: xor
Date: 2008-11-14 15:12:16 +0000 (Fri, 14 Nov 2008)
New Revision: 23579
Modified:
trunk/plugins/WoT/introduction/IntroductionServer.java
Log:
Indent.
Modified: trunk/plugins/WoT/introduction/IntroductionServer.java
===================================================================
--- trunk/plugins/WoT/introduction/IntroductionServer.java 2008-11-14
15:11:39 UTC (rev 23578)
+++ trunk/plugins/WoT/introduction/IntroductionServer.java 2008-11-14
15:12:16 UTC (rev 23579)
@@ -211,32 +211,32 @@
boolean retryWithNewIndex = false;
IntroductionPuzzle p = null;
do {
- try {
- p = mPuzzleFactories[(int)(Math.random() * 100) %
mPuzzleFactories.length].generatePuzzle(db, identity);
- p.exportToXML(os);
- os.close(); os = null;
- tempB.setReadOnly();
+ try {
+ p =
mPuzzleFactories[(int)(Math.random() * 100) %
mPuzzleFactories.length].generatePuzzle(db, identity);
+ p.exportToXML(os);
+ os.close(); os = null;
+ tempB.setReadOnly();
+
+ ClientMetadata cmd = new
ClientMetadata("text/xml");
+ InsertBlock ib = new InsertBlock(tempB,
cmd, p.getInsertURI());
- ClientMetadata cmd = new ClientMetadata("text/xml");
- InsertBlock ib = new InsertBlock(tempB, cmd,
p.getInsertURI());
-
- Logger.debug(this, "Started insert puzzle from " +
identity.getNickName());
-
- /* FIXME: use nonblocking insert maybe */
- mClient.insert(ib, false, null);
-
- db.store(p);
- db.commit();
+ Logger.debug(this, "Started insert
puzzle from " + identity.getNickName());
+
+ /* FIXME: use nonblocking insert maybe
*/
+ mClient.insert(ib, false, null);
+
+ db.store(p);
+ db.commit();
+ }
+ catch(InsertException e) {
+ if(e.errorCodes.getFirstCode() ==
InsertException.COLLISION)
+ retryWithNewIndex = true;
+ else
+ throw e;
+
+ Logger.error(this, "Puzzle with index "
+ p.getIndex() + " already inserted and not found in database! Retrying with
next index ...");
+ }
}
- catch(InsertException e) {
- if(e.errorCodes.getFirstCode() ==
InsertException.COLLISION)
- retryWithNewIndex = true;
- else
- throw e;
-
- Logger.error(this, "Puzzle with index " +
p.getIndex() + " already inserted and not found in database! Retrying with next
index ...");
- }
- }
while(retryWithNewIndex);
Logger.debug(this, "Successful insert of puzzle from "
+ identity.getNickName() + ": " + p.getRequestURI());
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs