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

Modified Files:
        ConnectionHandler.java Message.java PeerPacketMessage.java 
        Version.java 
Log Message:
6276:
Fix major bug in 6275; make Message.toRawMessage(Presentation,PeerHandler) be the one 
and only toRawMessage method, to prevent horrible confusion problems we had. Change 
all messages to implement it, all uses to use it.
Logging.


Index: ConnectionHandler.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/ConnectionHandler.java,v
retrieving revision 1.196
retrieving revision 1.197
diff -u -w -r1.196 -r1.197
--- ConnectionHandler.java      23 Oct 2003 18:47:55 -0000      1.196
+++ ConnectionHandler.java      24 Oct 2003 02:24:57 -0000      1.197
@@ -2094,6 +2094,8 @@
                        return false;
                }
                try {
+                       Core.logger.log(this, "Sending packet: \n"+
+                                                       new String(toSend), 
Logger.DEBUG);
                        sendBytes(toSend, 0, toSend.length, prio);
                } catch (IOException e) {
                        Core.logger.log(this, "Got IOException trying to send packet "+

Index: Message.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/Message.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -r1.10 -r1.11
--- Message.java        23 Oct 2003 18:47:55 -0000      1.10
+++ Message.java        24 Oct 2003 02:24:57 -0000      1.11
@@ -67,21 +67,13 @@
     
     /** Converts this message to something that can be sent over the wire,
       * using the given Presentation.
+      * @argument ph some messages need to know what PeerHandler they are going to
       */
-    public RawMessage toRawMessage(Presentation t) {
-       return toRawMessage(t, null);
-    }
-    
-    public RawMessage toRawMessage(Presentation t, ConnectionHandler ch) {
+    public RawMessage toRawMessage(Presentation t, PeerHandler ph) {
         RawMessage r = t.newMessage(getMessageName(), close , sustain,
                                     otherFields, 0, "EndMessage", null);
         
         return r;
-    }
-    
-    public RawMessage toRawMessage(Presentation t, ConnectionHandler ch,
-                                  PeerHandler ph) {
-       return toRawMessage(t, ch);
     }
     
     /** Part of the MessageObject implementation.

Index: PeerPacketMessage.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/PeerPacketMessage.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -w -r1.17 -r1.18
--- PeerPacketMessage.java      23 Oct 2003 18:47:55 -0000      1.17
+++ PeerPacketMessage.java      24 Oct 2003 02:24:57 -0000      1.18
@@ -71,7 +71,7 @@
                        this.content = null;
                        return;
                }
-               this.raw = msg.toRawMessage(p, null, ph);
+               this.raw = msg.toRawMessage(p, ph);
                try {
                        synchronized (bais) {
                                bais.reset();

Index: Version.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/Version.java,v
retrieving revision 1.468
retrieving revision 1.469
diff -u -w -r1.468 -r1.469
--- Version.java        23 Oct 2003 18:47:55 -0000      1.468
+++ Version.java        24 Oct 2003 02:24:57 -0000      1.469
@@ -18,7 +18,7 @@
     public static String protocolVersion = "1.47";
     
     /** The build number of the current revision */
-    public static final int buildNumber = 6275;
+    public static final int buildNumber = 6276;
     // 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