MINOR: connection: add cs_set_error() to set the error bits

Depending on the CS_FL_EOS status, we either set CS_FL_ERR_PENDING
or CS_FL_ERROR at various places. Let's have a generic function to
do this.
1 file changed