Update of /cvsroot/freenet/freenet/src/freenet
In directory sc8-pr-cvs1:/tmp/cvs-serv16449/src/freenet

Modified Files:
        ConnectionHandler.java Version.java 
Log Message:
6186: remove obsolete currentSender from ConnectionHandler (leftover from when we only 
sent one message at a time). Also fixes an NPE.


Index: ConnectionHandler.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/ConnectionHandler.java,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -r1.152 -r1.153
--- ConnectionHandler.java      9 Sep 2003 01:29:01 -0000       1.152
+++ ConnectionHandler.java      9 Sep 2003 16:06:02 -0000       1.153
@@ -189,7 +189,6 @@
        private int sentMessagesCount = 0;
        private byte[] sendBuffer = null;
     private volatile boolean trailingPresent=false;
-    MessageSend currentSender = null;
        private Object sendingQueueBytesLock = new Object();
        private int sendingQueueBytes = 0;
     // Constructors
@@ -1018,11 +1017,6 @@
                                }
                        }
                }               
-               //start sending the next message on the queue if such exists
-               /*if (sendingQueue.size() == 0) {
-                       if (logDEBUG)Core.logger.log(this, "sendingQueue empty, 
trailingPresent "+trailingPresent,Logger.DEBUG);
-                       currentSender=null;
-               }*/
                boolean needTerminate = false; // don't terminate while holding locks!
                if (sendingQueue.size() >0) { 
                        // while because if one sfe's we need to go to next
@@ -1030,7 +1024,7 @@
                        synchronized(sentMessages) {
                                sentMessages.clear();
                                while(sendingQueue.size() > 0 && curPacketLength < 
maxPacketLength) {
-                                       
currentSender=(MessageSend)sendingQueue.remove(0);
+                                       MessageSend 
currentSender=(MessageSend)sendingQueue.remove(0);
                                        
                                        byte[] b = currentSender.toSend;
                                        int l = b.length;
@@ -2168,7 +2162,6 @@
                        logDEBUG = Core.logger.shouldLog(Logger.DEBUG);
                        try {
                                if(size == toSend.length) {
-                                       currentSender = null;
                                        success = true;
                                        if(logDEBUG) logDEBUG("Successfully sent 
message "+this);
                                        messages++;
@@ -2181,7 +2174,6 @@
                                }
                                if(logDEBUG) logDEBUG("MessageSend finished sending 
message "+this);
                                done = true;
-                               currentSender = null;
                                synchronized(sendLock) {
                                        decSendQueue(toSend.length);
                                }
@@ -2385,7 +2377,6 @@
                                                                
Core.logger.log(this,"executing messageSend "+
                                                                                       
         "immediately ("+this+","+ms+")",
                                                                                       
         Logger.DEBUG);
-                                                       currentSender = ms;
                                                        sentMessages.add(ms);
                                                        sentMessagesCount = 1;
                                                        if(m instanceof Identify)
@@ -2649,7 +2640,6 @@
                        CHOutputStreamLock.notifyAll();
                }
                if(logDEBUG) logDEBUG("notified CHOS in terminate()");
-               //if(currentSender != null)
                        
                if(logDEBUG) logDEBUG("notified current sender in terminate()");
                //terminatedInstances++;

Index: Version.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/Version.java,v
retrieving revision 1.378
retrieving revision 1.379
diff -u -r1.378 -r1.379
--- Version.java        9 Sep 2003 15:28:10 -0000       1.378
+++ Version.java        9 Sep 2003 16:06:04 -0000       1.379
@@ -18,7 +18,7 @@
     public static String protocolVersion = "1.46";
     
     /** The build number of the current revision */
-    public static final int buildNumber = 6185;
+    public static final int buildNumber = 6186;
     // 6028: may 3; ARK retrieval fix
 
     public static final int ignoreBuildsAfter = 6500;

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

Reply via email to