On Wednesday 06 August 2008 14:53, [EMAIL PROTECTED] wrote:
> Author: nextgens
> Date: 2008-08-06 13:53:08 +0000 (Wed, 06 Aug 2008)
> New Revision: 21631
> 
> Modified:
>    trunk/freenet/src/freenet/node/PeerNode.java
> Log:
> bugfix related to bug #1933
> 
> Modified: trunk/freenet/src/freenet/node/PeerNode.java
> ===================================================================
> --- trunk/freenet/src/freenet/node/PeerNode.java      2008-08-06 10:55:32 UTC 
(rev 21630)
> +++ trunk/freenet/src/freenet/node/PeerNode.java      2008-08-06 13:53:08 UTC 
(rev 21631)
> @@ -2256,6 +2256,8 @@
>                       length -= 4;
>                       group = Global.getGroup(groupIndex);
>                       if(group == null) throw new FSParseException("Unknown 
> group 
number "+groupIndex);
> +                     if(logMINOR)
> +                             Logger.minor(PeerNode.class, "DSAGroup set 
to "+group.fingerprintToString()+ " using the group-index "+groupIndex);
>               }
>               // Is it compressed?
>               if((firstByte & 1) == 1) {
> @@ -2285,7 +2287,8 @@
>                       }
>               }
>               if(logMINOR)
> -                     Logger.minor(PeerNode.class, "Reference: " + new 
> String(data, offset, 
length) + '(' + length + ')');
> +                     Logger.minor(PeerNode.class, "Reference: " + 
> HexUtil.bytesToHex(data, 
offset, length) + '(' + length + ')');
> +
>               // Now decode it
>               ByteArrayInputStream bais = new ByteArrayInputStream(data, 
> offset, 
length);
>               InputStreamReader isr;
> @@ -2297,8 +2300,11 @@
>               BufferedReader br = new BufferedReader(isr);
>               try {
>                       SimpleFieldSet fs = new SimpleFieldSet(br, false, true);
> -                     if(group != null)
> -                             fs.putAllOverwrite(group.asFieldSet());
> +                     if(group != null) {
> +                             SimpleFieldSet sfs = new SimpleFieldSet(true);
> +                             sfs.put("dsaGroup", group.asFieldSet());
> +                             fs.putAllOverwrite(sfs);
> +                     }
>                       return fs;
>               } catch(IOException e) {
>                       FSParseException ex = new FSParseException("Impossible: 
> " + e);

Does this mean that nodes prior to the as-yet-unreleased 1155 cannot accept 
such compressed handshakes? If so, r21633 is rather premature and will break 
handshaking with older nodes, no?

Attachment: pgpBgKUMCuU3e.pgp
Description: PGP signature

_______________________________________________
Devl mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to