51.9. slapi_task_get_state()

Checks the current state of a task.
Syntax

int slapi_task_get_state(Slapi_Task *task)

Parameters

This function takes the following parameter:

task Points to the task operation which is being performed by the server.
Returns

This can return four different states:

  • SLAPI_TASK_SETUP (0), meaning the task has been initiated
  • SLAPI_TASK_RUNNING (1), meaning the task is in progress
  • SLAPI_TASK_FINISHED (2), meaning the task completed (there is a separate return code to indicate whether the task was successful)
  • SLAPI_TASK_CANCELLED (3), meaning the task was stopped before it was completed