geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r452297 - /geronimo/sandbox/gcache/server/src/main/java/org/apache/geronimo/gcache/transports/tcp/DefaultSelectionKeyProcessor.java
Date Tue, 03 Oct 2006 02:37:58 GMT
Author: jgenender
Date: Mon Oct  2 19:37:57 2006
New Revision: 452297

URL: http://svn.apache.org/viewvc?view=rev&rev=452297
Log:
Test checksum

Modified:
    geronimo/sandbox/gcache/server/src/main/java/org/apache/geronimo/gcache/transports/tcp/DefaultSelectionKeyProcessor.java

Modified: geronimo/sandbox/gcache/server/src/main/java/org/apache/geronimo/gcache/transports/tcp/DefaultSelectionKeyProcessor.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gcache/server/src/main/java/org/apache/geronimo/gcache/transports/tcp/DefaultSelectionKeyProcessor.java?view=diff&rev=452297&r1=452296&r2=452297
==============================================================================
--- geronimo/sandbox/gcache/server/src/main/java/org/apache/geronimo/gcache/transports/tcp/DefaultSelectionKeyProcessor.java
(original)
+++ geronimo/sandbox/gcache/server/src/main/java/org/apache/geronimo/gcache/transports/tcp/DefaultSelectionKeyProcessor.java
Mon Oct  2 19:37:57 2006
@@ -109,6 +109,10 @@
         Checksum calcChecksum = new CRC32();
         calcChecksum.update(commandArray, 0, commandArray.length);
         long newCheck  = calcChecksum.getValue();
+        if (newCheck != checksum){
+            //TODO send a resubmit??
+            return;
+        }
 
         ByteArrayInputStream bias = new ByteArrayInputStream(commandBuffer.array());
         ReadableByteChannel readChannel = Channels.newChannel(bias);



Mime
View raw message