Markus Mäkelä 29ece502f5 Minor refactoring of error handling
Refactored common code into a reusable function. Now all of the backend
error handling uses the same function.

Moved responsibility of the DCB error handling tracking to the backend
protocol. The routers no longer need to manage the
`dcb->dcb_errhandle_called` variable of the failed DCB.

Removed calls to handleError with client DCBs as parameters. All of the
routers close the DCB given to handleError if it is a client DCB. The only
time the error handler would be called is when the routeQuery function
fails. The handleError call is redundant as the router already knows that
the session should be closed when it returns from routeQuery.
2017-03-07 11:12:56 +02:00
..