/* The caller must take care not to invoke this function if the engine is not currently ready to receive payload bytes to send.  */
static void sendpld_flush(br_ssl_engine_context *rc, int force)
/* The caller must take care not to invoke this function if the engine is not currently ready to receive payload bytes to send.  */
static void sendpld_flush(br_ssl_engine_context *rc, int force)
{
	size_t xlen;
	unsigned char *buf;
	if (rc->oxa == rc->oxb) {
		return;
	}
	xlen = rc->oxa - rc->oxc;
	if (xlen == 0 && !force) {
		return;
	}
	buf = rc->out.vtable->encrypt(&rc->out.vtable,
		rc->record_type_out, rc->version_out,
		rc->obuf + rc->oxc, &xlen);
	rc->oxb = rc->oxa = (size_t)(buf - rc->obuf);
	rc->oxc = rc->oxa + xlen;
}