02514d6 515805 - Stop "initialize Database" crashes the server

Authored and Committed by nhosoi 14 years ago
    515805 - Stop "initialize Database" crashes the server
    
    https://bugzilla.redhat.com/show_bug.cgi?id=515805
    
    Fix Description:
    SLAPI_TASK_CANCELLED could be set in task_modify any time by
    users' modifying nsTaskCancel value to TRUE.  Then the following
    slapi_task_status_changed destroys the task, which is called
    even via a simple logging call slapi_task_log_status.  After the
    task is destroyed, any task related calls such as another
    slapi_task_log_status or slapi_task_finish crashes the server.
    
    This fix changes the behaviour to destroy the task only when
    task_state is SLAPI_TASK_FINISHED.  Once SLAPI_TASK_CANCELLED
    is set to task_state, changing the state to SLAPI_TASK_FINISHED
    by calling slapi_task_finish is the responsibility of the task
    application (e.g., import).  Until then, it is guranteed that
    the task is available.
    
        
file modified
+6 -2