smfi_setpriv

Synopsis


int smfi_setpriv(
SMFICTX *ctx,
void *privatedata
);

Set the private data pointer for this connection.

Description

Called When smfi_setpriv may be called in any of the xxfi_* callbacks.
Effects Sets the private data pointer for the context ctx.

Arguments

Argument Description
ctx Opaque context structure.
privatedata Pointer to private data. This value will be returned by subsequent calls to smfi_getpriv using ctx.

Return Values

smfi_setpriv returns MI_FAILURE if ctx is an invalid context. Otherwise, it returns MI_SUCCESS.

Notes

There is only one private data pointer per connection; multiple calls to smfi_setpriv with different values will cause previous values to be lost.

Before a filter terminates it should release the private data and set the pointer to NULL.