monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] 0.10 released


From: Christof Petig
Subject: Re: [Monotone-devel] 0.10 released
Date: Mon, 01 Mar 2004 15:50:14 +0100
User-agent: Mozilla/5.0 (X11; U; Linux ppc; de-AT; rv:1.6) Gecko/20040122 Debian/1.6-1

Christof Petig schrieb:
monotone: warning: caught bad_decode exception decoding input from peer off.net: 'bad checksum 0xd755001c vs. 0x9a55131c'

Remember:
this is a big-endian unsigned-by-default-char aka trouble-is-likely machine (powerpc)

I took a look into adler32.hh and found that because adler cast a char to an u32 the result is different for a machine where the default char is unsigned (on intel it's signed).

I'm currently trying the following patch

--- adler32.hh
+++ adler32.hh
@@ -22,7 +22,7 @@
     return (s2 << 16) | s1;
   }

-  inline void in(char c)
+  inline void in(signed char c)
   {
     s1 += static_cast<u32>(c);
     s1 &= 0xffff;
@@ -31,7 +31,7 @@
     ++len;
   }

-  inline void out(char c)
+  inline void out(signed char c)
   {
     s1 -= static_cast<u32>(c);
     s1 &= 0xffff;

... some seconds pass (compiling) ...

./monotone --key="" pull off.net net.venge.monotone
monotone: warning: doing anonymous pull
monotone: rebuilding merkle trees for collection net.venge.monotone
monotone: [keys: 3] [mcerts: 576]
monotone: connecting to off.net
monotone: [bytes in: 4606] [bytes out: 1116]
monotone: warning: caught bad_decode exception processing peer off.net: 'mcert 'a5e5c7116b113c9f60859e5ec245cad0f807c43e' does not exist in our database'
monotone: processing on fd 5 (peer off.net) finished, disconnecting

that looks promising
   Christof




reply via email to

[Prev in Thread] Current Thread [Next in Thread]