hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1077424 - /hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/ipc/Server.java
Date Fri, 04 Mar 2011 04:13:32 GMT
Author: omalley
Date: Fri Mar  4 04:13:32 2011
New Revision: 1077424

URL: http://svn.apache.org/viewvc?rev=1077424&view=rev
Log:
commit 0e13789cb9a8c83e876d2efb3bbe18dad4d7e502
Author: Devaraj Das <ddas@yahoo-inc.com>
Date:   Fri Apr 23 14:43:50 2010 -0700

    HADOOP:6674 from https://issues.apache.org/jira/secure/attachment/12442640/HADOOP-6674-y20.1.bugfix.patch
    
    +++ b/YAHOO-CHANGES.txt
    +    HADOOP-6674. Fixes the earlier patch to handle pings correctly (ddas).
    +

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/ipc/Server.java

Modified: hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/ipc/Server.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/ipc/Server.java?rev=1077424&r1=1077423&r2=1077424&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/ipc/Server.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/ipc/Server.java
Fri Mar  4 04:13:32 2011
@@ -1062,9 +1062,15 @@ public abstract class Server {
           dataLengthBuffer.flip();
           dataLength = dataLengthBuffer.getInt();
        
-          if (!useSasl && dataLength == Client.PING_CALL_ID) {
-            dataLengthBuffer.clear();
-            return 0;  //ping message
+          if (dataLength == Client.PING_CALL_ID) {
+            if(!useWrap) { //covers the !useSasl too
+              dataLengthBuffer.clear();
+              return 0;  //ping message
+            }
+          }
+          if (dataLength < 0) {
+            LOG.warn("Unexpected data length " + dataLength + "!! from " + 
+                getHostAddress());
           }
           data = ByteBuffer.allocate(dataLength);
         }



Mime
View raw message