Author: toad
Date: 2006-02-23 00:45:54 +0000 (Thu, 23 Feb 2006)
New Revision: 8125

Modified:
   trunk/freenet/src/freenet/node/Version.java
   trunk/freenet/src/freenet/node/fcp/ClientPutMessage.java
   trunk/freenet/src/freenet/node/fcp/ProtocolErrorMessage.java
Log:
474: Persistence=forever && UploadFrom!=disk is illegal, for now.

Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-02-23 00:04:50 UTC (rev 
8124)
+++ trunk/freenet/src/freenet/node/Version.java 2006-02-23 00:45:54 UTC (rev 
8125)
@@ -20,7 +20,7 @@
        public static final String protocolVersion = "1.0";

        /** The build number of the current revision */
-       private static final int buildNumber = 473;
+       private static final int buildNumber = 474;

        /** Oldest build of Fred we will talk to */
        private static final int lastGoodBuild = 403;

Modified: trunk/freenet/src/freenet/node/fcp/ClientPutMessage.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/ClientPutMessage.java    2006-02-23 
00:04:50 UTC (rev 8124)
+++ trunk/freenet/src/freenet/node/fcp/ClientPutMessage.java    2006-02-23 
00:45:54 UTC (rev 8125)
@@ -136,6 +136,9 @@
                } else {
                        throw new 
MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error 
parsing Persistence field: "+persistenceString, identifier);
                }
+               if(persistenceType == ClientRequest.PERSIST_FOREVER && 
!fromDisk) {
+                       throw new 
MessageInvalidException(ProtocolErrorMessage.NOT_SUPPORTED, 
"Persistence=forever AND UploadFrom=direct unsupported!", identifier);
+               }
                clientToken = fs.get("ClientToken");
        }


Modified: trunk/freenet/src/freenet/node/fcp/ProtocolErrorMessage.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/ProtocolErrorMessage.java        
2006-02-23 00:04:50 UTC (rev 8124)
+++ trunk/freenet/src/freenet/node/fcp/ProtocolErrorMessage.java        
2006-02-23 00:45:54 UTC (rev 8125)
@@ -33,6 +33,7 @@
        static final int COULD_NOT_WRITE_FILE = 13;
        static final int COULD_NOT_RENAME_FILE = 14;
        static final int NO_SUCH_IDENTIFIER = 15;
+       static final int NOT_SUPPORTED = 16;

        final int code;
        final String extra;
@@ -71,6 +72,8 @@
                        return "Could not rename file";
                case NO_SUCH_IDENTIFIER:
                        return "No such identifier";
+               case NOT_SUPPORTED:
+                       return "Not supported";
                default:
                        Logger.error(this, "Unknown error code: "+code, new 
Exception("debug"));
                return "(Unknown)";


Reply via email to