Netscape DIRECTORY SERVER 6.01 - PLUG-IN Manual page 378

Table of Contents

Advertisement

Functions for Managing Parameter Block
Parameters
This function takes the following parameters:
pb
arg
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
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()
378
Netscape Directory Server Plug-In Programmer's Guide • January 2002
Parameter block.
ID of the name-value pair that you want to set. For a list of IDs that you
can specify, see Chapter 15, "Parameter Block Reference."
Pointer to the value that you want to set in the parameter block.
,
, etc.), you can pass in the value directly. For example:
Slapi_Backend *
example for more details.
ManageDSAIT
char * strings
slapi_pblock_get()
control:
,
char
). If the
void *
to retrieve the

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the NETSCAPE DIRECTORY SERVER 6.01 - PLUG-IN and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Directory server 6.01

Table of Contents