Show Table of Contents
21.2. slapi_add_controls()
This function specifies an array of LDAPControls, and then either appends the array to the end of a specified array or uses it to create a new array.
An existing array is grown using slapi_ch_realloc(). Otherwise, a new array is created using slapi_ch_malloc().
Syntax
#include "slapi-plugin.h" void slapi_add_controls(LDAPControl ***ctrlsp, LDAPControl **newctrls, int copy)
Parameters
This function takes the following parameters:
| ctrlsp | Pointer that will receive the specified LDAPControl array. If ctrls is NULL, then a new array is created using slapi_ch_malloc(). |
| newctrasl | The specified LDAPControl array. |
| copy | Sets whether the given controls are copied. If the value is true (0), then all of the controls in newctrls are copied. If the value is false (1), then all of the controls in newctrls are used and owned by the array and must be freed using ldap_controls_free. |
Returns
This function returns LDAP_SUCCESS (LDAP result code) if successful.

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.