]> git.sur5r.net Git - openldap/commitdiff
quick fix for vc: allow custom controls tag
authorPierangelo Masarati <ando@openldap.org>
Tue, 4 Jan 2011 00:09:10 +0000 (00:09 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 4 Jan 2011 00:09:10 +0000 (00:09 +0000)
servers/slapd/controls.c
servers/slapd/proto-slap.h

index 18a7927a29fcb00227afaae43845d84fe64aa2b7..c4f9309d688e907acb2ef6077007bbdd4b9da734 100644 (file)
@@ -690,10 +690,21 @@ int slap_parse_ctrl(
        return rc;
 }
 
-int get_ctrls(
+int
+get_ctrls(
        Operation *op,
        SlapReply *rs,
        int sendres )
+{
+       return get_ctrls2( op, rs, sendres, LDAP_TAG_CONTROLS );
+}
+
+int
+get_ctrls2(
+       Operation *op,
+       SlapReply *rs,
+       int sendres,
+       ber_tag_t ctag )
 {
        int nctrls = 0;
        ber_tag_t tag;
@@ -719,7 +730,7 @@ int get_ctrls(
                return rs->sr_err;
        }
 
-       if(( tag = ber_peek_tag( ber, &len )) != LDAP_TAG_CONTROLS ) {
+       if(( tag = ber_peek_tag( ber, &len )) != ctag ) {
                if( tag == LBER_ERROR ) {
                        rs->sr_err = SLAPD_DISCONNECT;
                        rs->sr_text = "unexpected data in PDU";
index 5eafeb910560afbfb3424e1af1ff7d333b80b682..c28f7c054dc74bfcf8a06c911cf87b6da8c153cb 100644 (file)
@@ -650,6 +650,11 @@ LDAP_SLAPD_F (int) get_ctrls LDAP_P((
        Operation *op,
        SlapReply *rs,
        int senderrors ));
+LDAP_SLAPD_F (int) get_ctrls2 LDAP_P((
+       Operation *op,
+       SlapReply *rs,
+       int senderrors,
+       ber_tag_t ctag ));
 LDAP_SLAPD_F (int) register_supported_control2 LDAP_P((
        const char *controloid,
        slap_mask_t controlmask,