ldap_mods_free()--Free LDAP Modify Storage




Syntax

#include <ldap.h>

typedef struct ldapmod {
        int mod_op;        char *mod_type;
        union {
	        char 		**modv_strvals;
	        struct berval 	**modv_bvals;
        } mod_vals;
    } LDAPMod;

#define mod_values mod_vals.modv_strvals
#define mod_bvalues mod_vals.modv_bvals

void ldap_mods_free(
		LDAPMod 	*mods[],
                int 		freemods)



Threadsafe: Yes

The ldap_mods_free() function is used to free storage associated with the ldap_modify() and ldap_modify_s() functions.

ldap_mods_free() can be used to free each element of a NULL-terminated array of modification structures. If freemods is nonzero, the mods pointer itself is freed as well. See for a description of the LDAPMod structure.

Authorities and Locks

No OS/400 authority is required. All authority checking is done by the LDAP server.

Parameters

mods
(Input) Specifies a NULL-terminated array of modifications to make to the entry. Each element of the mods array is a pointer to an LDAPMod structure.

freemods
(Input) Specifies whether or not the mods pointer is to be freed in addition to the NULL-terminated array of mod structures.

Return Value

NONE

Error Conditions

ldap_mods_free() API does not return an error code.

Error Messages

    The following message may be set from this function.
    CPF3CF2 E  Error(s) occurred during running of ldap_mods_free API.

Related Information

    ldap_memfree() -- free up storage that has been allocated by the LDAP client library.
    ldap_control_free() -- free a single LDAPControl structure.
    ldap_controls_free() -- free an array of LDAPControl structures.
    ldap_ber_free() -- free up the BerElement structure.
    ldap_msgfree() -- free up the LDAPMessage structure.


Top | LDAP APIs List
APIs by category

[Information Center Home Page | Feedback ] [Legal | AS/400 Glossary]