tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r407689 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes: group/interceptors/TcpFailureDetector.java io/ChannelData.java
Date Fri, 19 May 2006 02:39:45 GMT
Author: fhanik
Date: Thu May 18 19:39:45 2006
New Revision: 407689

URL: http://svn.apache.org/viewvc?rev=407689&view=rev
Log:
Fixed data extraction bug

Modified:
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java?rev=407689&r1=407688&r2=407689&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
Thu May 18 19:39:45 2006
@@ -170,10 +170,10 @@
         
         //check suspect members if they are still alive,
         //if not, simply issue the memberDisappeared message
-        
-        for (Iterator i = suspect.keySet().iterator(); i.hasNext(); ) {
-            MemberImpl m = (MemberImpl)i.next();
-            if (!memberAlive(m)) {
+        MemberImpl[] keys = (MemberImpl[])suspect.keySet().toArray(new MemberImpl[suspect.size()]);
+        for (int i=0; i<keys.length; i++ ) {
+            MemberImpl m = (MemberImpl)keys[i];
+            if (membership.getMember(m)!=null && (!memberAlive(m))) {
                 membership.removeMember(m);
                 super.memberDisappeared(m);
                 suspect.remove(m);

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java?rev=407689&r1=407688&r2=407689&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/ChannelData.java
Thu May 18 19:39:45 2006
@@ -235,8 +235,9 @@
         //data.message = new XByteBuffer(new byte[xsize],false);
         data.message = BufferPool.getBufferPool().getBuffer(xsize,false);
         offset += 4; //message length
-        System.arraycopy(b,offset,data.message.getBytesDirect(),0,data.message.getLength());
-        offset += data.message.getLength(); //message data
+        System.arraycopy(b,offset,data.message.getBytesDirect(),0,xsize);
+        data.message.append(b,offset,xsize);
+        offset += xsize; //message data
         return data;
     }
     



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message