Hi Andres,
> All you need to do is to read BufferDesc->state into a local variable and then make decisions based on that
You are right, thanks.
Here is the corrected patch.
-- Best regards,Aleksander Alekseev