Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 55CAE18DDB for ; Mon, 1 Feb 2016 19:20:54 +0000 (UTC) Received: (qmail 66434 invoked by uid 500); 1 Feb 2016 19:20:32 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 66362 invoked by uid 500); 1 Feb 2016 19:20:31 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 66352 invoked by uid 99); 1 Feb 2016 19:20:31 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Feb 2016 19:20:31 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 547D2C0044 for ; Mon, 1 Feb 2016 19:20:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.446 X-Spam-Level: X-Spam-Status: No, score=0.446 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.554] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id cY1zA8Dk3JDn for ; Mon, 1 Feb 2016 19:20:30 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTP id 4CB9C43B41 for ; Mon, 1 Feb 2016 19:20:30 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id AF84AE0678 for ; Mon, 1 Feb 2016 19:20:29 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id A9CF63A0069 for ; Mon, 1 Feb 2016 19:20:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1727989 - /tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java Date: Mon, 01 Feb 2016 19:20:29 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160201192029.A9CF63A0069@svn01-us-west.apache.org> Author: markt Date: Mon Feb 1 19:20:29 2016 New Revision: 1727989 URL: http://svn.apache.org/viewvc?rev=1727989&view=rev Log: Format. No functional change. Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java?rev=1727989&r1=1727988&r2=1727989&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java Mon Feb 1 19:20:29 2016 @@ -547,18 +547,22 @@ public class SecureNioChannel extends Ni //compact the buffer netInBuffer.compact(); - if ( unwrap.getStatus()==Status.OK || unwrap.getStatus()==Status.BUFFER_UNDERFLOW ) { + if (unwrap.getStatus() == Status.OK || unwrap.getStatus() == Status.BUFFER_UNDERFLOW) { //we did receive some data, add it to our total read += unwrap.bytesProduced(); //perform any tasks if needed - if (unwrap.getHandshakeStatus() == HandshakeStatus.NEED_TASK) tasks(); + if (unwrap.getHandshakeStatus() == HandshakeStatus.NEED_TASK) { + tasks(); + } //if we need more network data, then bail out for now. - if ( unwrap.getStatus() == Status.BUFFER_UNDERFLOW ) break; - }else if ( unwrap.getStatus()==Status.BUFFER_OVERFLOW && read>0 ) { + if (unwrap.getStatus() == Status.BUFFER_UNDERFLOW) { + break; + } + } else if (unwrap.getStatus() == Status.BUFFER_OVERFLOW && read > 0) { //buffer overflow can happen, if we have read data, then //empty out the dst buffer before we do another read break; - }else { + } else { //here we should trap BUFFER_OVERFLOW and call expand on the buffer //for now, throw an exception, as we initialized the buffers //in the constructor --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org