f209fea Ticket 49410 - opened connection can remain no longer poll, like hanging

Authored and Committed by tbordaz 2 years ago
    Ticket 49410 - opened connection can remain no longer poll, like hanging
    
    Bug Description:
    	Some opened connection are no longer poll.
    	Those connections has 'gettingber' toggle set although there is
    	no more worker thread reading it.
    	The reason they have gettingber set is that the last
    	operation had 'persistent search' flag. With such flag
    	gettingber is not reset.
    	persistent flag is set even when no persistent search/sync_repl
    	was received on the connection.
    	The problem is that the flag is tested on the wrong operation.
    	The tested operation can be
    		- the first operation when the connection entered in turbo mode
    		- the previous operation if several ops PDUs were read on the network
    		- accessing random memory
    
    	In theory testing the flag can lead to sigsev even
    	if it never crash
    
    Fix Description:
    	The fix is to use the operation that is in the pblock
    	In such case pb_op is no longer used, so we can get rid of it.
    	In addition make pb_conn a local variable where it is used
    
    https://pagure.io/389-ds-base/issue/49410
    
    Reviewed by: Ludwig Krispenz, Mark Reynolds
    
    Platforms tested: F26
    
    Flag Day: no
    
    Doc impact: no