]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/controls.c
minor naming cleanup; improvements to DN mapping layer; major docs update
[openldap] / servers / slapd / controls.c
index 688e7266072a9472527b4fabc9687f214cf2672b..34cf6cf731942e1030b12ff47f6f1bd5e7dede72 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2004 The OpenLDAP Foundation.
+ * Copyright 1998-2005 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -523,8 +523,6 @@ int get_ctrls(
 
                        c->ldctl_iscritical = (crit != 0);
                        tag = ber_peek_tag( ber, &len );
-               } else {
-                       c->ldctl_iscritical = 0;
                }
 
                if( tag == LBER_OCTETSTRING ) {
@@ -541,8 +539,6 @@ int get_ctrls(
                                rs->sr_text = "decoding controls error";
                                goto return_results;
                        }
-               } else {
-                       BER_BVZERO( &c->ldctl_value );
                }
 
                Debug( LDAP_DEBUG_TRACE,
@@ -1044,7 +1040,9 @@ static int parsePreRead (
                an[i].an_oc_exclude = 0;
                rc = slap_bv2ad( &an[i].an_name, &an[i].an_desc, &dummy );
                if ( rc != LDAP_SUCCESS && ctrl->ldctl_iscritical ) {
-                       rs->sr_text = dummy ? dummy : "postread control: unknown attributeType";
+                       rs->sr_text = dummy
+                               ? dummy
+                               : "postread control: unknown attributeType";
                        return rc;
                }
        }
@@ -1100,7 +1098,9 @@ static int parsePostRead (
                an[i].an_oc_exclude = 0;
                rc = slap_bv2ad( &an[i].an_name, &an[i].an_desc, &dummy );
                if ( rc != LDAP_SUCCESS && ctrl->ldctl_iscritical ) {
-                       rs->sr_text = dummy ? dummy : "postread control: unknown attributeType";
+                       rs->sr_text = dummy
+                               ? dummy
+                               : "postread control: unknown attributeType";
                        return rc;
                }
        }