Driver: Fix pending buffer flush.

This commit is contained in:
Nodir Temirkhodjaev 2019-03-12 15:22:24 +05:00
parent 734017b73f
commit e3ed088ee4

View File

@ -134,17 +134,14 @@ fort_buffer_prepare (PFORT_BUFFER buf, UINT32 len, PCHAR *out,
/* Is it time to flush logs? */
if (out_len - new_top < FORT_LOG_SIZE_MAX) {
if (irp != NULL) {
buf->out_len = 0;
*irp = buf->irp;
buf->irp = NULL;
*info = new_top;
new_top = 0;
} else {
buf->out_len = out_top;
new_top = out_top;
}
buf->out_len = new_top;
}
*out = buf->out + out_top;