]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/compare.c
stdlib.h should be included as <ac/stdlib.h>
[openldap] / libraries / libldap / compare.c
index a48dda120f335884d2fe9494fac39122e6656991..2b890b1fe9d7af4f47646f54b9bb5f93b162121c 100644 (file)
@@ -51,6 +51,7 @@ ldap_compare_ext(
        LDAPControl **cctrls,
        int     *msgidp )
 {
+       int rc;
        BerElement      *ber;
 
        Debug( LDAP_DEBUG_TRACE, "ldap_compare\n", 0, 0, 0 );
@@ -61,6 +62,10 @@ ldap_compare_ext(
        assert( attr != NULL );
        assert( msgidp != NULL );
 
+       /* check client controls */
+       rc = ldap_int_client_controls( ld, cctrls );
+       if( rc != LDAP_SUCCESS ) return rc;
+
        /* create a message to send */
        if ( (ber = ldap_alloc_ber_with_options( ld )) == NULL ) {
                return( LDAP_NO_MEMORY );