Netscape DIRECTORY SERVER 6.02 - PLUG-IN Manual page 379

Table of Contents

Advertisement

Parameters
This function takes the following parameters:
Parameter block.
pb
ID of the name-value pair that you want to set. For a list of IDs that you
arg
can specify, see Chapter 15, "Parameter Block Reference."
Pointer to the value that you want to set in the parameter block.
value
Returns
This function returns one of the following values:
0 if successful.
-1 if an error occurs (for example, if an invalid ID is specified).
Memory Concerns
The value to be passed in must always be a pointer, even for integer arguments.
For example, if you wanted to do a search with the
int managedsait = 1;
...
slapi_pblock_set(pb, SLAPI_MANAGEDSAIT, &managedsait);
A call similar to the following example will cause a crash:
slapi_pblock_set(pb, SLAPI_MANAGEDSAIT, 1);
However, for values which are already pointers (
,
**arrays
Slapi_Backend *
char *target_dn = slapi_ch_strdup(some_dn);
slapi_pblock_set(pb, SLAPI_TARGET_DN, target_dn);
OR
slapi_pblock_set(pb, SLAPI_TARGET_DN, NULL);
With some compilers, you will have to cast the value argument to (
caller allocates the memory passed in, the caller is responsible for freeing that
memory. Also, it is recommended to use
value to free rather than relying on a potentially dangling pointer. See the
slapi_pblock_get()
, etc.), you can pass in the value directly. For example:
slapi_pblock_get()
example for more details.
Functions for Managing Parameter Block
control:
ManageDSAIT
,
char * strings
char
void *
to retrieve the
Chapter 14
Function Reference
). If the
379

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 6.02

Table of Contents