mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

dugan
24.25.2009 088d8dc0d4611ebb36443a9aa8724f2d6776befd
opends/src/server/org/opends/server/extensions/SASLByteChannel.java
@@ -92,7 +92,8 @@
      this.saslContext = saslContext;
      this.channel = connection.getChannel();
      this.readBuffer = ByteBuffer.allocate(connection.getAppBufferSize());
      this.decodeBuffer = ByteBuffer.allocate(connection.getAppBufferSize());
      this.decodeBuffer =
                ByteBuffer.allocate(connection.getAppBufferSize() + lengthSize);
    }
    /**
@@ -217,7 +218,7 @@
      //The buffer length is greater than what is there, save what is there,
      //figure out how much more is needed and return.
      if(bufLength > readBuffer.position()) {
        neededBytes = bufLength - readBuffer.position() + 4;
        neededBytes = bufLength - readBuffer.position() + lengthSize;
        readBuffer.flip();
        decodeBuffer.put(readBuffer);
        readBuffer.clear();