This affects only afs command handlers, where short writes should
never happen as the socket fd is set to blocking mode. But still.
int sc_send_result(struct osl_object *result, void *private)
{
struct stream_cipher_context *scc = private;
+ int ret;
if (!result->size)
return 1;
- return sc_send_bin_buffer(scc, result->data, result->size);
+ ret = sc_send_bin_buffer(scc, result->data, result->size);
+ if (ret < 0 || ret == result->size)
+ return ret;
+ return -E_SHORT_WRITE;
}
int com_select(struct stream_cipher_context *scc, int argc, char * const * const argv)