Author: toad
Date: 2006-07-22 21:09:56 +0000 (Sat, 22 Jul 2006)
New Revision: 9724

Modified:
   trunk/freenet/src/freenet/node/PeerNode.java
   trunk/freenet/src/freenet/node/fcp/ModifyPeer.java
Log:
comments, ModifyPeer should not fail simply because not all possible fields are 
set.

Modified: trunk/freenet/src/freenet/node/PeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerNode.java        2006-07-22 21:00:08 UTC 
(rev 9723)
+++ trunk/freenet/src/freenet/node/PeerNode.java        2006-07-22 21:09:56 UTC 
(rev 9724)
@@ -979,6 +979,7 @@
                                listeningHandshakeBurstCount++;
                                if(verifiedIncompatibleOlderVersion || 
verifiedIncompatibleNewerVersion) { 
                                        // Let them know we're here, but have 
no hope of connecting
+                                       // Send one packet only.
                                        listeningHandshakeBurstCount = 0;
                                } else if(listeningHandshakeBurstCount >= 
listeningHandshakeBurstSize) {
                                        listeningHandshakeBurstCount = 0;

Modified: trunk/freenet/src/freenet/node/fcp/ModifyPeer.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/ModifyPeer.java  2006-07-22 21:00:08 UTC 
(rev 9723)
+++ trunk/freenet/src/freenet/node/fcp/ModifyPeer.java  2006-07-22 21:09:56 UTC 
(rev 9724)
@@ -39,30 +39,18 @@
                                } else {
                                        pn.enablePeer();
                                }
-                       } else {
-                               ProtocolErrorMessage msg = new 
ProtocolErrorMessage(ProtocolErrorMessage.MESSAGE_PARSE_ERROR, false, 
"IsDisabled had no value", nodeIdentifier);
-                               handler.outputHandler.queue(msg);
-                               return;
                        }
                }
                String isListenOnlyString = fs.get("IsListenOnly");
                if(isListenOnlyString != null) {
                        if(!isListenOnlyString.equals("")) {
                                
pn.setListenOnly(Fields.stringToBool(isListenOnlyString, false));
-                       } else {
-                               ProtocolErrorMessage msg = new 
ProtocolErrorMessage(ProtocolErrorMessage.MESSAGE_PARSE_ERROR, false, 
"IsListenOnly had no value", nodeIdentifier);
-                               handler.outputHandler.queue(msg);
-                               return;
                        }
                }
                String isBurstOnlyString = fs.get("IsBurstOnly");
                if(isBurstOnlyString != null) {
                        if(!isBurstOnlyString.equals("")) {
                                
pn.setBurstOnly(Fields.stringToBool(isBurstOnlyString, false));
-                       } else {
-                               ProtocolErrorMessage msg = new 
ProtocolErrorMessage(ProtocolErrorMessage.MESSAGE_PARSE_ERROR, false, 
"IsBurstOnly had no value", nodeIdentifier);
-                               handler.outputHandler.queue(msg);
-                               return;
                        }
                }
                handler.outputHandler.queue(new Peer(pn, true, true));


Reply via email to