Discard the cached BLE packet

When using a BLE connection, it's not sufficient to purge the buffers of
the underlying I/O stream. The locally cached BLE packet needs to be
discarded also.
This commit is contained in:
Jef Driesen 2019-09-03 16:26:40 +02:00
parent d62674a803
commit 912eb37ac3

View File

@ -327,6 +327,8 @@ mares_iconhd_transfer (mares_iconhd_device_t *device, const unsigned char comman
// Discard any garbage bytes.
dc_iostream_purge (device->iostream, DC_DIRECTION_INPUT);
device->available = 0;
device->offset = 0;
}
return DC_STATUS_SUCCESS;