SVN: ZODB/branches/jim-simulation/src/ZEO/cache.py Fixed bug in encoding data lengths. Need test before merging to

Jim Fulton <[email protected]>
Newsgroups gmane.comp.python.zope.zodb.cvs
Message-ID <20100604230427.C2A53941E9__44600.1698998318$1275692674$gmane$org@cvs.zope.org>
Log message for revision 113121:
  Fixed bug in encoding data lengths.  Need test before merging to
  trunk.
  

Changed:
  U   ZODB/branches/jim-simulation/src/ZEO/cache.py

-=-
Modified: ZODB/branches/jim-simulation/src/ZEO/cache.py
===================================================================
--- ZODB/branches/jim-simulation/src/ZEO/cache.py	2010-06-04 23:04:25 UTC (rev 113120)
+++ ZODB/branches/jim-simulation/src/ZEO/cache.py	2010-06-04 23:04:27 UTC (rev 113121)
@@ -750,7 +750,7 @@
             # The first hex digit shows the operation, the second the outcome.
             # This method has been carefully tuned to be as fast as possible.
             # Note: when tracing is disabled, this method is hidden by a dummy.
-            encoded = (dlen + 255) & 0x7fffff00 | code
+            encoded = (dlen << 8) + code
             if tid is None:
                 tid = z64
             if end_tid is None:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.