Netscape DIRECTORY SERVER 6.02 - PLUG-IN Manual page 378

Table of Contents

Advertisement

Functions for Managing Parameter Block
slapi_pblock_get(pb, SOME_PARAM, &someparam);
slapi_pblock_set(pb, SOME_PARAM, NULL); /* make sure no one else can
reference this parameter */
slapi_ch_free_string(&someparam);
...
Some internal functions may change the value passed in, so it is recommended to
use
slapi_pblock_get()
potential dangling pointer. This is shown in the example above, which sets
someparam
See Also
slapi_pblock_destroy()
slapi_pblock_set()
slapi_pblock_new()
Creates a new parameter block.
Syntax
#include "slapi-plugin.h"
Slapi_PBlock *slapi_pblock_new();
Returns
This function returns a pointer to the new parameter block.
Memory Concerns
The
pblock
slapi_pblock_destroy()
free()
slapi_pblock_set()
Sets the value of a name-value pair in a parameter block.
Syntax
#include "slapi-plugin.h"
int slapi_pblock_set( Slapi_PBlock *pb, int arg, void *value );
378
Netscape Directory Server Plug-In Programmer's Guide • May 2002
to retrieve the value again, rather than relying on a
to
after setting it in the
NULL
pointer allocated with this function must always be freed by
. The use of other memory deallocators (for example,
) is not supported and may lead to crashes or memory leaks.
.
pblock

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 6.02

Table of Contents