Author: zothar
Date: 2008-01-21 18:57:32 +0000 (Mon, 21 Jan 2008)
New Revision: 17188
Modified:
trunk/freenet/src/freenet/node/PeerNode.java
Log:
Explicitly node that the ARK fields are always optional as a pair and short
circuit checking if they are both omitted
Modified: trunk/freenet/src/freenet/node/PeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerNode.java 2008-01-21 17:23:51 UTC
(rev 17187)
+++ trunk/freenet/src/freenet/node/PeerNode.java 2008-01-21 18:57:32 UTC
(rev 17188)
@@ -656,7 +656,10 @@
try {
String arkPubKey = fs.get("ark.pubURI");
arkNo = fs.getLong("ark.number", -1);
- if(arkPubKey != null && arkNo != -1) {
+ if(arkPubKey == null && arkNo == -1) {
+ // ark.pubURI and ark.number are always
optional as a pair
+ return false;
+ } else if(arkPubKey != null && arkNo != -1) {
if(onStartup) arkNo++;
// this is the number of the ref we are parsing.
// we want the number of the next edition.