harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r585070 - in /harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap: AddOp.java asn1/LdapASN1Constant.java
Date Tue, 16 Oct 2007 07:59:26 GMT
Author: tonywu
Date: Tue Oct 16 00:59:24 2007
New Revision: 585070

URL: http://svn.apache.org/viewvc?rev=585070&view=rev
Log:
Apply patch Harmony-4944 ([classlib][ldap] Add support for parsing ldap add response)

Modified:
    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/AddOp.java
    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/LdapASN1Constant.java

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/AddOp.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/AddOp.java?rev=585070&r1=585069&r2=585070&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/AddOp.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/AddOp.java
Tue Oct 16 00:59:24 2007
@@ -62,7 +62,7 @@
     }
 
     public ASN1Decodable getResponse() {
-        return (result == null) ? new LdapResult() : result;
+        return result = (result == null) ? new LdapResult() : result;
     }
 
     public int getResponseId() {

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/LdapASN1Constant.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/LdapASN1Constant.java?rev=585070&r1=585069&r2=585070&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/LdapASN1Constant.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/ldap/asn1/LdapASN1Constant.java
Tue Oct 16 00:59:24 2007
@@ -37,9 +37,10 @@
 
     public static final int OP_BIND_RESPONSE = 1;
 
-    public static final int OP_ADD_REQUEST = 9;
+    // FIXME change them to appropriate index number in the future.
+    public static final int OP_ADD_REQUEST = 2;
     
-    public static final int OP_ADD_RESPONSE = 10;
+    public static final int OP_ADD_RESPONSE = 3;
     
     public static final ASN1Type Attribute = new ASN1SequenceWrap(
             new ASN1Type[] { ASN1OctetString.getInstance(), // type
@@ -81,6 +82,9 @@
         }
     };
     
+    public static final ASN1Type AddResponse = new ASN1Implicit(
+            ASN1Constants.CLASS_APPLICATION, 9, LDAPResult);
+    
     public static final ASN1Type Control = new ASN1SequenceWrap(new ASN1Type[] {
             ASN1OctetString.getInstance(), // controlType
             ASN1Boolean.getInstance(), // criticality
@@ -112,8 +116,9 @@
             new ASN1Type[] {
                     ASN1Integer.getInstance(),
                     new ASN1ChoiceWrap(new ASN1Type[] { BindRequest,
-                            BindResponse, 
-                            AddRequest, 
+                            BindResponse,
+                            AddRequest,
+                            AddResponse,
                             }),
                     new ASN1SequenceOf(Control) }) {
         {



Mime
View raw message