/*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Adapted for inclusion into OpenLDAP by Kurt D. Zeilenga */
* PUBLIC LICENSE, OR OTHER PRIOR WRITTEN CONSENT FROM NOVELL, COULD SUBJECT
* THE PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY.
*---*/
+/* Note: A verbatim copy of version 2.0.1 of the OpenLDAP Public License
+ * can be found in the file "build/LICENSE-2.0.1" in this distribution
+ * of OpenLDAP Software.
+ */
#include "portable.h"
#include <ac/stdlib.h>
#include <ac/string.h>
#include <ac/time.h>
-#include <ac/ctype.h>
#include "ldap-int.h"
ber_tag_t tag;
BerElement *ber;
- if ( (ld==NULL) || (vlvinfop==NULL) || (ctrlp == NULL) ) {
- ld->ld_errno = LDAP_PARAM_ERROR;
- return(ld->ld_errno);
- }
+ assert( ld != NULL );
+ assert( LDAP_VALID( ld ) );
+ assert( vlvinfop != NULL );
+ assert( ctrlp != NULL );
if ((ber = ldap_alloc_ber_with_options(ld)) == NULL) {
ld->ld_errno = LDAP_NO_MEMORY;
tag = ber_printf(ber, /*{*/ "N}");
if( tag == LBER_ERROR ) goto exit;
- ld->ld_errno = ldap_int_create_control(
- LDAP_CONTROL_VLVREQUEST, ber, 1, ctrlp);
+ ld->ld_errno = ldap_create_control( LDAP_CONTROL_VLVREQUEST,
+ ber, 1, ctrlp);
ber_free(ber, 1);
return(ld->ld_errno);
ber_tag_t tag, berTag;
ber_len_t berLen;
+ assert( ld != NULL );
+ assert( LDAP_VALID( ld ) );
+
if (contextp) {
*contextp = NULL; /* Make sure we return a NULL if error occurs. */
}
- if (ld == NULL) {
- ld->ld_errno = LDAP_PARAM_ERROR;
- return(ld->ld_errno);
- }
-
if (ctrls == NULL) {
ld->ld_errno = LDAP_CONTROL_NOT_FOUND;
return(ld->ld_errno);