Author: toad
Date: 2005-11-24 20:56:37 +0000 (Thu, 24 Nov 2005)
New Revision: 7584
Modified:
trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
trunk/freenet/src/freenet/node/InsertSender.java
trunk/freenet/src/freenet/node/Version.java
Log:
205:
Fix NPE.
Cut threads from 50 to 20 for inserts.
Modified: trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
===================================================================
--- trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
2005-11-24 19:36:52 UTC (rev 7583)
+++ trunk/freenet/src/freenet/client/HighLevelSimpleClientImpl.java
2005-11-24 20:56:37 UTC (rev 7584)
@@ -46,7 +46,7 @@
/** If set, only check the local datastore, don't send an actual
request out.
* Don't turn this off either. */
static final boolean LOCAL_REQUESTS_ONLY = false;
- static final int SPLITFILE_INSERT_THREADS = 50;
+ static final int SPLITFILE_INSERT_THREADS = 20;
static final int SPLITFILE_INSERT_RETRIES = 0;
// going by memory usage only; 4kB per stripe
static final int MAX_SPLITFILE_BLOCKS_PER_SEGMENT = 1024;
Modified: trunk/freenet/src/freenet/node/InsertSender.java
===================================================================
--- trunk/freenet/src/freenet/node/InsertSender.java 2005-11-24 19:36:52 UTC
(rev 7583)
+++ trunk/freenet/src/freenet/node/InsertSender.java 2005-11-24 20:56:37 UTC
(rev 7584)
@@ -37,6 +37,7 @@
this.fromStore = fromStore;
this.closestLocation = closestLocation;
this.startTime = System.currentTimeMillis();
+ senderThreads = new LinkedList();
Thread t = new Thread(this, "InsertSender for UID "+uid+" on
"+node.portNumber+" at "+System.currentTimeMillis());
t.setDaemon(true);
t.start();
@@ -60,7 +61,7 @@
final double closestLocation;
final long startTime;
private BlockTransmitter bt;
- private LinkedList senderThreads;
+ private final LinkedList senderThreads;
private int status = -1;
static final int NOT_FINISHED = -1;
Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2005-11-24 19:36:52 UTC (rev
7583)
+++ trunk/freenet/src/freenet/node/Version.java 2005-11-24 20:56:37 UTC (rev
7584)
@@ -20,10 +20,10 @@
public static final String protocolVersion = "1.0";
/** The build number of the current revision */
- public static final int buildNumber = 204;
+ public static final int buildNumber = 205;
/** Oldest build of Fred we will talk to */
- public static final int lastGoodBuild = 204;
+ public static final int lastGoodBuild = 205;
/** The highest reported build of fred */
public static int highestSeenBuild = buildNumber;