ecs_update_task_protection function

Updates the protection status of a task