Update of /cvsroot/freenet/freenet/src/freenet/node/states/request
In directory sc8-pr-cvs1:/tmp/cvs-serv25874/src/freenet/node/states/request

Modified Files:
        ReceivingInsert.java TransferInsert.java 
Log Message:
6181:
* 
* Keep 1 connection open at least for messages, not 2, and fix race conditions in 
OpenConnectionManager. Should (i.e. might) fix recent behaviour of opening many 
unnecessary connections to nodes.
* Fix NullPointerException in FreenetURI.
* Don't call transferSucceeded for transferring inserts. Reasons outlined in comments. 
Just terminateRouting.
* Logging improvements.


Index: ReceivingInsert.java
===================================================================
RCS file: 
/cvsroot/freenet/freenet/src/freenet/node/states/request/ReceivingInsert.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- ReceivingInsert.java        3 Sep 2003 18:10:13 -0000       1.20
+++ ReceivingInsert.java        8 Sep 2003 19:59:42 -0000       1.21
@@ -110,7 +110,7 @@
     
     public State receivedMessage(Node n, SendFinished sf) throws StateException {
        n.logger.log(this, "Received "+sf+" in "+this+" - WTF?",
-                    Logger.NORMAL);
+                    Logger.MINOR);
        return this;
     }
 }

Index: TransferInsert.java
===================================================================
RCS file: 
/cvsroot/freenet/freenet/src/freenet/node/states/request/TransferInsert.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- TransferInsert.java 4 Sep 2003 22:45:06 -0000       1.14
+++ TransferInsert.java 8 Sep 2003 19:59:42 -0000       1.15
@@ -273,30 +273,13 @@
        case Presentation.CB_OK:
            n.logger.log(this, "Insert transferred successfully! for "+this,
                         Logger.MINOR);
-           if(acceptedTime <= 0) {
-               n.logger.log(this, "acceptedTime not set yet!: "+this,
-                            Logger.NORMAL);
-//             terminateRouting(false, false);
-               // Could be restarted even in AWSD! Inserts are wierd...
-               break;
-           }
-           if(insertReplyTime <= 0) {
-               n.logger.log(this, "insertReplyTime not set yet!: "+this,
-                            Logger.NORMAL);
-               terminateRouting(false, false);
-               break;
-           }
-           // FIXME: inserts are not the same. Search time will be longer.
-           if(logDEBUG)
-               n.logger.log(this, "insertReplyTime = "+insertReplyTime+
-                            ", routedTime = "+routedTime+
-                            ", endTransferTime = "+endTransferTime, 
-                            Logger.DEBUG);
-           routes.transferSucceeded(acceptedTime - routedTime, hopsToLive,
-                                    sendingData.length(), 
-                                    endTransferTime - acceptedTime);
-           // Of course, NGR doesn't know about the time between insertReply and 
Accepted
-           // FIXME! - but the whole Insert system needs rewriting at the behaviour 
level
+           terminateRouting(true, true);
+           // The search time is useless because it's a two stage process for 
inserts, and
+           // Accepted can be sent with no effort.
+           // The transfer rate is useless because it's probably bound by the source 
node.
+           // FIXME: change the whole insert process to make it accountable to 
NGRouting.
+           // Suggestion: include pull-through in the node level, only credit the 
node if
+           // we can pull it through another node.
            break;
            // receivingData will be caught by checkTransition
            

_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to