diff options
Diffstat (limited to 'core/serial_usb_android.cpp')
-rw-r--r-- | core/serial_usb_android.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/serial_usb_android.cpp b/core/serial_usb_android.cpp index a5db132ae..8f53c56bb 100644 --- a/core/serial_usb_android.cpp +++ b/core/serial_usb_android.cpp @@ -141,7 +141,11 @@ static dc_status_t serial_usb_android_read(void *io, void *data, size_t size, si env->GetByteArrayRegion(array, 0, retval, (jbyte *) data); env->DeleteLocalRef(array); TRACE (device->context, "%s: actual read size: %i", __FUNCTION__, retval); - return DC_STATUS_SUCCESS; + + if (retval < size) + return DC_STATUS_TIMEOUT; + else + return DC_STATUS_SUCCESS; } |