directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 36412 - in incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap: . encoder/bind encoder/search
Date Sun, 15 Aug 2004 16:38:57 GMT
Author: akarasulu
Date: Sun Aug 15 09:38:57 2004
New Revision: 36412

Modified:
   incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/SnickersDecoder.java
   incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/bind/BindResponseEncoder.java
   incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/search/SearchResponseDoneEncoder.java
   incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/search/SearchResponseEntryEncoder.java
Log:
added empty context specifc tlv for controls

Modified: incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/SnickersDecoder.java
==============================================================================
--- incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/SnickersDecoder.java
(original)
+++ incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/SnickersDecoder.java
Sun Aug 15 09:38:57 2004
@@ -137,18 +137,17 @@
         try
         {
             int amount = -1;
-            do
+            while( in.available() > 0 )
             {
-                buf = new byte[BUFSZ];
-                amount = in.read( buf );
+                buf = new byte[in.available()];
 
-                if ( amount == -1 )
+                if ( ( amount = in.read( buf ) ) == -1 )
                 {
                     break;
                 }
 
                 digester.decode( ByteBuffer.wrap( buf, 0, amount ) );
-            } while( amount >= 0 );
+            }
         }
         catch( Exception e )
         {

Modified: incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/bind/BindResponseEncoder.java
==============================================================================
--- incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/bind/BindResponseEncoder.java
(original)
+++ incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/bind/BindResponseEncoder.java
Sun Aug 15 09:38:57 2004
@@ -97,6 +97,13 @@
         }
 
         consumer.finish( bind );
+
+        tmp.setTag( LdapTag.CONTEXT_SPECIFIC_TAG_0, false );
+        consumer.tag( tmp );
+        tmp.setLength( 0 );
+        consumer.length( tmp );
+        consumer.finish( tmp );
+
         consumer.finish( top );
     }
 }

Modified: incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/search/SearchResponseDoneEncoder.java
==============================================================================
--- incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/search/SearchResponseDoneEncoder.java
(original)
+++ incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/search/SearchResponseDoneEncoder.java
Sun Aug 15 09:38:57 2004
@@ -99,6 +99,13 @@
         resultEncoder.encode( resp.getLdapResult() );
 
         consumer.finish( srd );
+
+        tmp.setTag( LdapTag.CONTEXT_SPECIFIC_TAG_0, false );
+        consumer.tag( tmp );
+        tmp.setLength( 0 );
+        consumer.length( tmp );
+        consumer.finish( tmp );
+
         consumer.finish( top );
     }
 }

Modified: incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/search/SearchResponseEntryEncoder.java
==============================================================================
--- incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/search/SearchResponseEntryEncoder.java
(original)
+++ incubator/directory/snickers/trunk/ldap-ber-provider/src/java/org/apache/snickers/ldap/encoder/search/SearchResponseEntryEncoder.java
Sun Aug 15 09:38:57 2004
@@ -119,6 +119,13 @@
 
         consumer.finish( pal );
         consumer.finish( sre );
+
+        tmp.setTag( LdapTag.CONTEXT_SPECIFIC_TAG_0, false );
+        consumer.tag( tmp );
+        tmp.setLength( 0 );
+        consumer.length( tmp );
+        consumer.finish( tmp );
+
         consumer.finish( top );
     }
 

Mime
View raw message