HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Parameters This function takes the following parameter:
Points to the task operation which is being performed by the server.
task
See also
slapi_task_inc_refcount()
slapi_task_get_refcount()
51.6 slapi_task_finish()
Called when the task is completed. As with other functions which terminate a task, this updates
the task entry to record that the task is complete and returns a result code to the user. This function
queues an event to destroy the task, which frees the task itself as well as any cleanup defined in
a custom destructor callback function.
Syntax
void slapi_task_finish(Slapi_Task *task, int rc)
Parameters This function takes the following parameters:
Points to the task operation which is being performed by the server.
task
Contains the result code for the task.
rc
See also
slapi_task_cancel()
51.7 slapi_task_get_data()
Retrieves an opaque data pointer from a task.
Syntax
void * slapi_task_get_data(Slapi_Task *task)
Parameters This function takes the following parameter:
Points to the task operation which is being performed by the server.
task
Memory concerns This function returns the pointer that was passed into slapi_task_set_data().
Most of the time, do not free this memory directly. It is recommended that a destructor callback
function, such as slapi_task_set_destructor_fn(), be specified after creating the task. This descructor
callback function is then responsible for cleaning up the task data.
See also
slapi_task_set_data()
slapi_task_set_destructor_fn()
TaskCallbackFn
51.8 slapi_task_get_refcount()
Checks the current reference count of the task. Reference counts are used by tasks that open
multiple threads; slapi_task_get_refcount() checks to see if any or all the threads have
finished and allows any shared data to be freed safely.
Syntax
int slapi_task_get_refcount(Slapi_Task *task)
51.6 slapi_task_finish() 379