21.6. slapi_dup_control()
Makes an allocated copy of an LDAPControl. This function duplicates the contents of an LDAPControl structure. All fields within the LDAPControl are copied to a new, allocated structure, and a pointer to the new structure is returned.
#include "slapi-plugin.h" LDAPControl * slapi_dup_control( LDAPControl *ctrl )
This function takes the following parameter:
|
ctrl
| Pointer to an LDAPControl structure whose contents are to be duplicated. |
This function returns one of the following values:
- A pointer to an allocated LDAPControl structure if successful.
NULLif an error occurs.
The structure that is returned should be freed by calling ldap_control_free(), which is an LDAP API function; see the Mozilla LDAP SDK for C Programmer's Guide.
ldap_control_free()

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.